0
点赞
收藏
分享

微信扫一扫

Mysql入门到精通-通过bin-log查询数据变更历史记录

心智的年轮 2022-05-27 阅读 113

 

首先查询bin-log文件

show master logs;

show binlog events in 'log-bin.000005' ;

cd 到binlog的目录下

-- 查询log输出

mysqlbinlog  --no-defaults --base64-output=decode-rows -v log-bin.000005

-- grep 过滤

mysqlbinlog  --no-defaults --base64-output=decode-rows -v log-bin.00
0005 | grep 'xxxx'

 

-- grep 上下10行
mysqlbinlog  --no-defaults --base64-output=decode-rows -v log-bin.000005 | grep -A10 -B10 'xx'
 


举报

相关推荐

0 条评论