Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is MySQL's FLASHBACK data rollback?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "what is the FLASHBACK data rollback of MySQL". In the daily operation, I believe that many people have doubts about what the FLASHBACK data rollback of MySQL is. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubt of "what is the FLASHBACK data rollback of MySQL?" Next, please follow the editor to study!

The FLASHBACK function in the database is an impressive function. If you do something wrong, how can you recover the data during that period of time and keep the production application from stopping? this is a function that database administrators want to have. SQL SERVER needs the help of third-party software to complete data rollback and recovery, the unique FLASHBACK function of ORACLE, and the pg_dirtyread function of POSTGRESQL. Data rollback and data recovery can be carried out in some ways.

Of course, basically, if you TRUNCATE TABLE your table, you can't retrieve the data, so you won't say much about the principle.

MYSQL uses BINLOG2SQL as an open source tool for data recovery and rollback. If you understand the binlog principle of MYSQL, you will quickly understand how it can recover data.

Here we can do an experiment:

We can set up a database ttt, a table ttt in the library, and a field create table ttt (id int) in the table.

Then we do the relevant operations in the database.

Insert operation

Insert into ttt (id) values (1), (2), (3)

Update operation

Update ttt set id = 2 where id = 1

Delete operation

Delete from ttt where id = 2

If you want to generate a rollback statement, add flushback directly after the above statement

You can look at the above picture, through which you can understand the recording mode of the BINLOG statement.

No matter how you insert the data, batch or single insert, the records you insert will be parsed one by one in BINLOG

2 in the case of multiple data in one sentence of your UPDATE or DELETE data table, you will also record each piece of data.

In a word, all records are recorded according to rows, not logical statements.

At the same time, this tool can extract relevant data according to your pos, time point, log scope, and so on.

Therefore, with this tool, basically most of the misoperations can be used for data recovery and recovery.

At this point, the study on "what is the FLASHBACK data rollback of MySQL" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report