TiDB-Binlog的部署方法

本文介绍了如何编辑viscale-out-binlog.yaml文件来配置Pump和Drainer服务器,处理binlog同步与权限设置。后续步骤包括TiDB集群的扩容操作、检查和修改binlog设置,以及使用binlogctl工具进行binlog管理。
摘要由CSDN通过智能技术生成

1.编辑binlog拓扑文件

vi scale-out-binlog.yaml

pump_servers:

  - host: 172.31.0.49

drainer_servers:

  - host: 172.31.0.60

    config:

      syncer.db-type: "mysql"

      syncer.to.host: "172.31.0.49"

      syncer.to.user: "root"

      syncer.to.password: "mysql"

      syncer.to.port: 3306

下游创建权限用户(drainermysql的用户权限)

mysql> create user 'root'@'172.31.0.135' idenfitide by 'mysql';

mysql> grant all privileges on *.* to 'root'@'172.31.0.135';

初始需要自己同步,binlog不支持全量复制,用br或者其他工具,然后tidb binlog

个人见解:

先自己br同步,然后指定tso进行应用。

2.扩容组件

安装

tiup cluster scale-out tidb-haha scale-out-binlog.yaml -uroot -p

查看状态

tiup cluster display tidb-haha

3.查看binlog

查看tidb binlog是否开启

mysql> show variables like 'log_bin';

修改参数

tiup cluster edit-config tidb-haha

参数见下方

reload

tiup cluster reload tidb-test

再次查看binlog

mysql> show variables like 'log_bin';

4.使用binlogctl

1.下载包(https://docs.pingcap.com/zh/tidb/v6.1/download-ecosystem-tools),解压

获取:

wget https://download.pingcap.org/tidb-community-toolkit-v6.1.0-linux-amd64.tar.gz

 

解压tar xvf xxxxxxxx

2.进入路径,查看,包含(dumplinglightningcdcdmspark等等)

3.设置环境变量

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

汪灵骅

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值