1. Show Differences Found by Pt-Table-Checksum

Show Differences Found by Pt-Table-Checksum

Louvre Museum

First of all,pt-table-checksum is perfect for checking if the master and its slaves are in-sync. It answers the question “Are the slaves consistent with the master?”. However, if they’re not, pt-table-checksum doesn’t actually tell you what exactly is wrong.

Frompt-table-checksum to pt-table-sync

Nevertheless, pt-table-sync may give you a partial answer. It can print SQL statements to sync the replication cluster. Thus, reading the SQL code, you may guess what records were missing/extra or differ.

This is not very convenient. I’d note that pt-table-sync serves its main purpose – syncing two or more servers.

Using TwinDB Table Compare

TwinDB Table Compare is a tool that shows the exact difference between a slave and its master. It’s published on PyPi, therefore, you can install it right away:

TwinDB Table Compare depends on MySQLdb. In turn, MySQLdb requires several dependencies you need to install to get it compiled.

Once you install them, you can see how your master and slave differ.

We published the code on GitHub. And we’d love to see your feedback and contributions.

Previous Post Next Post