mysql - sql数据还原
天蓬老师
天蓬老师 2017-04-17 14:53:59
0
3
682

执行sql语句如下:

update main set state = 'process'

本来应该是要执行

update main set state = 'process' where id = '8136' 

由于忘记了加条件,导致好十万的数据全部状态改错了。有没有办法将之前的数据还原的,之前没有做数据备份的啊?(当然我是测试环境的数据。但是状态不对,也会对业务线有影响的。)

求解。。

天蓬老师
天蓬老师

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

reply all(3)
黄舟

The update operation is automatically committed and there is no way to roll it back. You can only check whether the binlog is enabled, and then go to the log to find the data
Reference article: http://database.51cto.com/art/ 201212/374563.htm

Peter_Zhu

Try using rollback first. If it doesn’t work, check to see if there is a binlog.
If not, let me give you an idea:
If you damage the hard drive, just tell the leader that the hard drive is broken!

PHPzhong

Well, when such a tragedy occurs, we can only find binlog as the last straw.

So the standard operation is: back up the table before all INSERT, UPDATE, DELETE operations. Don’t trust your brain and paws.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!