How to write the configuration file for TiDB Binlog synchronization to specify the tables to be synchronized

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb binlog同步复制,配置文件中怎么写同步指定的表

| username: TiDBer_QHSxuEa1

The image is not visible. Please provide the text you need translated.

| username: 像风一样的男子 | Original post link

The parameters replicate-do-db and replicate-do-table specify the databases and tables to be synchronized.

| username: TiDBer_QHSxuEa1 | Original post link

The main issue is that I don’t know how to write the format correctly.

| username: tidb菜鸟一只 | Original post link

Example of a TOML file
drainer.toml (6.8 KB)
Mainly here
image

| username: TiDBer_QHSxuEa1 | Original post link

How do I directly write the online configuration file? I get an error when I write it like this.

| username: cassblanca | Original post link

tidb-binlog/cmd/drainer/drainer.toml at master · pingcap/tidb-binlog (github.com)
[syncer.replicate-do-table]
db-name = “test”
tbl-name = “log”

| username: tidb菜鸟一只 | Original post link

What error is being reported?

| username: TiDBer_QHSxuEa1 | Original post link

Reporting this timeout, the log file is blank. If the replicate-to-table related parameters are not added, the drainer can be started normally.

| username: TiDBer_QHSxuEa1 | Original post link

syncer.replicate-do-table:
- db-name: test
  tbl-name: table_name
| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.