Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

https://docs-archive.pingcap.com/zh/tidb/v4.0/maintain-tidb-binlog-cluster



配置
在 Drainer 中添加以下配置来开启 relay log 功能:

[syncer.relay]
# 保存 relay log 的目录,空值表示不开启。
# 只有下游是 TiDB 或 MySQL 时该配置才有生效。
log-dir = "/dir/to/save/log"
# 单个 relay log 文件大小限制(单位:字节)。
# 超出该值后会将 binlog 数据写入到下一个 relay log 文件。
max-file-size = 10485760


登录上游tidb查看状态

Code Block
show variables like "log_bin";
show pump status;
show drainer status;




登录下游tidb

Code Block
select  * from tidb_binlog.checkpoint;