Skip to content

shengxianye/mysqlbinlog_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

mysqlbinlog_analysis

Analysis Mysql Binlog to redolog or undolog

MySQL自带的mysqlbinlog工具解析的log阅读不方便,且字段名替换成了@1,@2等,不是很好理解

使用方法:

step1:

/www/env/mysql/bin/mysqlbinlog -v --base64-output=DECODE-ROWS mysql-bin.002067 > 5.sql

step2:

python mysqlbinlog_query.py --host localhost --user root --password agm43gadsg --mode redo --infile /www/env/mysql/arch/5.sql --outfile /www/env/mysql/arch/5.log --filtertable table1 --filterdml UPDATE

mode 可选2个参数,分别时redo和undo
infile 输入文件名
outfile 输出文件名
filtertable 过滤表名(TABLE1)
filterdml 过滤dml动作(DELETE INSERT UPDATE)

联系方式
[email protected]

About

Analysis Mysql Binlog to redolog or undolog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages