# TiDB Binlog 的使用 - 部署

__*TiDB binlog 部署*__
__*TiDB 开启 binlog*__


```
# toplogy file

pump_servers:
  - host: 172.31.0.232
drainer_servers:
  - host: 172.31.0.135
    config:
      syncer.db-type: "mysql"
      syncer.to.host: "172.31.0.135"
      syncer.to.user: "root"
      syncer.to.password: "mysql"
      syncer.to.port: 3306

#############################################

# parameter

server_configs.tidb.binlog.enable: true
server_configs.tidb.binlog.ignore-error: true
```

-------------------------------------------------------------
我们需要在拓扑文件中加入pump_servers 和 drainer_servers 配置,用来标识主机IP。我们需要在拓扑文件中配置目标数据库的 IP 地址、端口、用户名、密码和数据库类型。
我们需要开启 TiDB 的 binlog。