mysql update 如何回滚?
天蓬老师
天蓬老师 2017-04-17 14:48:29
0
4
1206

昨天晚上手贱update一张表,忘加限制条件了,本来应该是
update companys set right=1 where id =1234

后面的where id=1234忘加了,结果所有数据都update了。欲哭无泪。
请问怎么回滚呢?
求大神救急

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(4)
PHPzhong

It’s already too late, because only transactions can assist in completing the rollback, and what you have already completed cannot be rolled back! Unless you have done a database backup~

刘奇

Have you turned on the binary log? You should be able to restore it to before the update

巴扎黑

Have you opened the bin-log in your database? If so, open the statement where you were found and restore the replay of the bin-log of the misoperation statement.

刘奇

You can use binlog2sql to quickly roll back. For specific methods, please see this article "How to quickly recover data after MySQL misoperation"

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template