我有配置复制主-主mysql服务器:这里演示设计:
Master1 = 10.10.10.1数据库= db1表= tbl1 Master2 = 10.10.10.2数据库= db1表= tbl1
mysql配置:根禁用从网络访问(安全原因)。我创建user: replicator,使用ssl将服务器连接到授予复制从服务器和复制客户端。
默认端口: 3306
我的问题是如何使用pt-table-checksum & pt-table-sync从主1上的tbl1同步到tbl1主2同步。
谢谢。
发布于 2016-10-13 09:47:01
在这两台机器上创建复制用户,并确保可以从netwrok (远程测试与mysql的连接) smth中使用它们,如下所示:
GRANT ALL ON *.* to tuwi@'%' identified by 'verySecretPassw';我建议双向同步https://www.percona.com/doc/percona-toolkit/2.2/pt-table-sync.html#bidirectional-syncing
但是,如果这对你不起作用,我建议像这样的独立同步(你只需从第二个主机执行这个)。
pt-table-sync --transaction --chunk-size 10 --execute h=host1,u=tuwi,p=verySecretPassw,D=db1,t=table1 h=localhost,D=db1https://stackoverflow.com/questions/21898485
复制相似问题