We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
误删行 如果是使用 delete 语句误删了数据行,可以用 Flashback 工具通过闪回把数据恢复回来
Flashback 恢复数据的原理,是修改 binlog 的内容,拿回原库重放。而能够使用这个方案的前提是,需要确保 binlog_format=row 和 binlog_row_image=FULL
binlog_format=row
binlog_row_image=FULL
具体恢复数据时,对单个事务做如下处理:
对于多个事务,例如:
(A)delete ... (B)insert ... (C)update ...
现在要把数据库恢复回这三个事务操作之前的状态,用 Flashback 工具解析 binlog 后,写回主库的命令是:
(reverse C)update ... (reverse B)delete ... (reverse A)insert ...
也就是说,如果误删数据涉及到了多个事务的话,需要将事务的顺序调过来再执行
The text was updated successfully, but these errors were encountered:
No branches or pull requests
误删行
如果是使用 delete 语句误删了数据行,可以用 Flashback 工具通过闪回把数据恢复回来
Flashback 恢复数据的原理,是修改 binlog 的内容,拿回原库重放。而能够使用这个方案的前提是,需要确保
binlog_format=row
和binlog_row_image=FULL
具体恢复数据时,对单个事务做如下处理:
对于多个事务,例如:
现在要把数据库恢复回这三个事务操作之前的状态,用 Flashback 工具解析 binlog 后,写回主库的命令是:
也就是说,如果误删数据涉及到了多个事务的话,需要将事务的顺序调过来再执行
The text was updated successfully, but these errors were encountered: