官方:github.com/danfengcao/binlog2sql
解析出准备的SQL
/usr/local/anaconda2/bin/python binlog2sql.py -h127.0.0.1 -P3306 -uroot -p'root' -dbh_db -tarctype --start-datetime='2021-10-20 15:30:00' --start-file='mysql-bin.000357'
解析出回滚的SQL
/usr/local/anaconda2/bin/python binlog2sql.py --flashback -h127.0.0.1 -P3306 -uroot -p'root' -dbh_db -tarctype --start-datetime='2021-10-20 15:30:00' --start-file='mysql-bin.000357' >/tmp/1.sql
恢复
mysql -uroot -proot bh_db
阅读(1132) | 评论(0) | 转发(0) |