【 TiDB 版本】 V4.0.9
【概述】 Tidb binlog同步到Mysql,实现Tidb的增量数据到mysql,(之前的历史数据不需要到Mysql),检查了所有数据正常,但无数据到mysql,日志无报错
【问题】 无数据到mysql,日志无报错
【附件】
日志:log:
[2022/01/27 15:40:54.442 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5064]
[2022/01/27 15:40:54.442 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5080]
[2022/01/27 15:40:56.356 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5070]
[2022/01/27 15:40:56.608 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5064]
[2022/01/27 15:40:56.786 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5062]
[2022/01/27 15:40:56.912 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5078]
[2022/01/27 15:40:57.282 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:57.390 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:57.516 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:57.692 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5072]
[2022/01/27 15:40:57.921 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:58.300 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:58.495 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:58.523 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5072]
启动命令:
bin/drainer --node-id=192.168.1.161:8249 --addr=192.168.1.161:8249 --pd-urls=http://192.168.1.62:2379,http://192.168.1.63:2379,http://192.168.1.64:2379 --data-dir=/TiDB/tidb-data/drainer-8249 --log-file=/TiDB/tidb-deploy/drainer-8249/log/drainer.log --config=conf/drainer.toml --initial-commit-ts=0
配置:
[syncer]
txn-batch = 100
worker-count = 2
db-type = “mysql”
safe-mode = true
sql-mode = “”
ignore-schemas=“INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql,qd_api,zhy,dm_meta,METRICS_SCHEMA,test,visualization,tidb_loader”
[[syncer.replicate-do-table]]
db-name =“xxxxx”
tbl-name = “A,B,C”
[syncer.to]
host = “192.168.1.163”
user = “root”
password = “xxxxxx”
port = xxxXX
TIDB是用了主从模式,现在从库也是用TIDB,现在业务需要多一个从MYSQL来使用,一样的同步配置,同步给Mysql就不生效了