my2sql icon indicating copy to clipboard operation
my2sql copied to clipboard

请问支持mysql MGR下的binlog解析吗

Open ShelwinSu opened this issue 4 years ago • 5 comments

我测试了下最新的mysql 8.0.22在mg环境下的binlog my2sql -user admin -password xxxxxxx-host 127.0.0.1 -port 3306 -work-type rollback -start-file mysql-bin.000118 -start-datetime "2021-01-06 18:50:00" -stop-datetime "2021-01-06 18:55:00" -output-dir . [2021/01/06 19:32:30] [info] events.go:58 start thread 2 to generate redo/rollback sql [2021/01/06 19:32:30] [info] binlogsyncer.go:144 create BinlogSyncer with config {1113306 mysql 127.0.0.1 3306 admin utf8 false false false Local false 0 0s 0s 0 false false 0} [2021/01/06 19:32:30] [info] events.go:208 start thread to write redo/rollback sql into file [2021/01/06 19:32:30] [info] events.go:58 start thread 1 to generate redo/rollback sql [2021/01/06 19:32:30] [info] binlogsyncer.go:360 begin to sync binlog from position (mysql-bin.000118, 4) [2021/01/06 19:32:30] [info] stats_process.go:166 start thread to analyze statistics from binlog [2021/01/06 19:32:30] [info] repl.go:15 start to get binlog from mysql [2021/01/06 19:32:30] [info] binlogsyncer.go:777 rotate to (mysql-bin.000118, 4) [2021/01/06 19:32:51] [info] binlogsyncer.go:777 rotate to (mysql-bin.000119, 4) [2021/01/06 19:32:51] [info] com.go:70 stop to get event. StopDateTime set. current event Timestamp 1609930503 Stop DateTime Timestamp 1609930500 [2021/01/06 19:32:51] [info] repl.go:17 finish getting binlog from mysql [2021/01/06 19:32:51] [info] stats_process.go:266 exit thread to analyze statistics from binlog [2021/01/06 19:32:51] [info] events.go:183 exit thread 1 to generate redo/rollback sql [2021/01/06 19:32:51] [info] events.go:183 exit thread 2 to generate redo/rollback sql [2021/01/06 19:32:51] [info] events.go:257 finish writing rollback sql into tmp files, start to revert content order of tmp files [2021/01/06 19:32:51] [info] events.go:270 finish reverting content order of tmp files [2021/01/06 19:32:51] [info] events.go:275 exit thread to write redo/rollback sql into file

ShelwinSu avatar Jan 06 '21 11:01 ShelwinSu

能解析的,有异常吗?

liuhr avatar Jan 06 '21 12:01 liuhr

我这边不行,mysql 8.0.22 mgr环境下exit thread to write redo/rollback sql into file

ShelwinSu avatar Jan 07 '21 01:01 ShelwinSu

exit thread to write redo/rollback sql into file 是正常的日志哦,如果没有sql解析出来,就确认下这段区间是否有binlog event,也可以调整下区间,多测试几次吧。

liuhr avatar Jan 07 '21 01:01 liuhr

以下是用mysqlbinlog解析的和您工具的截图,请参考 1609991332(1) 1609991467(1)

ShelwinSu avatar Jan 07 '21 03:01 ShelwinSu

加下Q讨论下吧:2896876652

liuhr avatar Jan 07 '21 05:01 liuhr