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

How to undo an operation when mysql uses row format binlog

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly introduces mysql how to undo the operation when using row format binlog, what it involves, from theoretical knowledge to learn, there are many books, literature for everyone to refer to, from a practical point of view, accumulated years of practical experience can be shared with you.

MySQL uses row format and uses the default binlog_row_image=full, binlog records the complete pre-and post-update data image. Therefore, undo operations based on row format binlog are feasible. This article mainly introduces mysql use row format binlog undo operation example, hope to help you can help to everyone.

[GitHub page] [linux binaries]

for example

./ binlog_undo -f /data/mysql/log-bin.000004 -p 3958 -o binlog.out

It scans all transactions in/data/mysql/log-bin.000004 from position 3958 to the end, reverses the order of all transactions and statements in each transaction, reverses all operations, inverts WRITE and Delete, swaps the front and back mirrors of UPDATE, and then writes the generated binlog file to binlog.out. Then you can undo the operation by playing back the binlog with the mysqlbinlog tool.

This tool can be used to cancel the operation that is not synchronized to the backup on the original after the active and standby switch, to avoid complete reconstruction; it can also be used as a regret medicine for misoperation.

Related recommendations:

MySQL Creating Users and Authorizing and Revoking User Rights

mysql5.7 create user authorization delete user revocation authorization sample code

Oracle PL/SQL object permissions and system permissions revocation differences

The above is a detailed explanation of mysql using row format binlog undo operation details, more please pay attention to other related 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

Database

Wechat

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

12
Report