1
votes

I have configuration replication master - master mysql server: Here Illustration design :

Master1 = 10.10.10.1 database = db1 table = tbl1

Master2 = 10.10.10.2 database = db1 table = tbl1

mysql config: root disabled to access from network (security reason). I create user: replicator using ssl to connect both server with grant replication slave and replication client.

Default port: 3306

My question how to sync from tbl1 on master 1 to tbl1 master 2 with pt-table-checksum & pt-table-sync

Thank you.

1

1 Answers

0
votes

Create the replication user on both machines and make sure you can use them from the netwrok (test connection with mysql remotely) smth like this:

GRANT ALL ON *.* to tuwi@'%' identified by 'verySecretPassw';

I would suggest bidirectional syncing https://www.percona.com/doc/percona-toolkit/2.2/pt-table-sync.html#bidirectional-syncing

but if that wont work for you i would suggest an inital sync like this (you just execute this from the second host)

pt-table-sync --transaction --chunk-size 10 --execute h=host1,u=tuwi,p=verySecretPassw,D=db1,t=table1 h=localhost,D=db1