Mariadb – Percona pt-table-sync Can’t determine Master

connectionsmariadbperconareplication

We have following Multi master replication scenario. We are using MariaDB 10.1.34 and Percona 3.0.11

Master: Name: db-master1 (192.168.14.5)

Slave:
Name: db-slave2 (192.168.15.5) Replica Connection name: master1 (192.168.14.5)

SHOW SLAVE 'master1' STATUS\G on slave server is working fine.

I deliberately produced the data inconsistency and deleted 5 records in Test.dummy table on slave. Once I ran the below command to sync:

pt-table-sync --replicate --sync-to-master h=localhost,u=checksum_user,p=checksum_password --check-master --channel=master1

I got the error:

Can't determine the Master of h=localhost

Best Answer

pt-table-sync --execute --verbose --databases Test -t dummy --no-foreign-key-checks h=192.168.14.5,u=checksum_user,p=checksum_password h=192.168.15.5

The above command successfully synchronized the data from Test.dummy on Master (192.168.14.5) to Test.dummy on Slave (192.168.15.5).