my2sql icon indicating copy to clipboard operation
my2sql copied to clipboard

Unknown command 是咋回事

Open czxin788 opened this issue 4 years ago • 1 comments

/root/czx/my2sql -user root -password 123 -work-type 2sql -start-file mysql-bin.001242 -databases db1 -add-extraInfo -output-dir tmpdir [2021/09/10 11:44:25] [info] events.go:208 start thread to write redo/rollback sql into file [2021/09/10 11:44:25] [info] stats_process.go:166 start thread to analyze statistics from binlog [2021/09/10 11:44:25] [info] events.go:58 start thread 2 to generate redo/rollback sql [2021/09/10 11:44:25] [info] binlogsyncer.go:144 create BinlogSyncer with config {1113306 mysql 127.0.0.1 3306 root utf8 false false false Local false 0 0s 0s 0 false false 0} [2021/09/10 11:44:25] [info] events.go:58 start thread 1 to generate redo/rollback sql [2021/09/10 11:44:25] [info] binlogsyncer.go:360 begin to sync binlog from position (mysql-bin.001242, 4) [2021/09/10 11:44:25] [fatal] repl.go:40 error replication from master 127.0.0.1:3306 ERROR 1047 (HY000): Unknown command

czxin788 avatar Sep 10 '21 03:09 czxin788

这个工具是使用 https://github.com/siddontang 的binlog解析库完成binlog解析, 这个错误是 github.com/siddontang/go-mysql/mysql/errname.go 包发出来的 ,应该是binlog里面的内容有这个库不识别的格式。

liuhr avatar Sep 10 '21 14:09 liuhr