您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

mysql数据恢复

bubuko 2022/1/25 20:07:51 mysql 字数 1146 阅读 957 来源 http://www.bubuko.com/infolist-5-1.html

数据库操作 --查找之前的入库语句 --查看日志文件路径 show variables like 'log_%'; --查看当前日志文件号 show master status; --查看数据操作日志 show binlog events in 'mysql-bin.000005'; mysql/b ...

数据库操作 --查找之前的入库语句

--查看日志文件路径

show variables like ‘log_%‘;

--查看当前日志文件号

show master status;

--查看数据操作日志

show binlog events in ‘mysql-bin.000005‘;

 

mysql/bin目录操作 恢复数据

--日志写文件

# ./mysqlbinlog /www/server/data/mysql-bin.000005 >/root/sms_record.txt

--从日志中查找表 或者字段

./mysqlbinlog /www/server/data/mysql-bin.000005 |more|grep  sms_send_history

--恢复数据操作 起始位置  结束位置

# ./mysqlbinlog /www/server/data/mysql-bin.000007 --start-position 9967062 --stop-position 9967326|mysql -uroot -p dangerous(库名)

 

 

https://blog.csdn.net/z694644032/article/details/104463920

 

https://www.cnblogs.com/-mrl/p/9959365.html

mysql数据恢复

原文:https://www.cnblogs.com/shan2017/p/12425413.html


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶