Hi how to check data consistency between two tables in master and slave replication
Hi how to check data consistency between two tables in master and slav
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Hi how to check data consistency between two tables in master and slave replication
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Srinivasan RamamoorthiRank #877 · 2.5K reputationPosted Sep 3, 2021, 8:52 AM EDT
Use pt table checksum
pt-table-checksum [OPTIONS] [DSN]
pt-table-checksum performs an online replication consistency check by executing checksum queries on the master, which produces different results on replicas that are inconsistent with the master. The optional DSN specifies the master host. The tool’s “EXIT STATUS” is non-zero if any differences are found, or if any warnings or errors occur.
The following command will connect to the replication master on localhost, checksum every table, and report the results on every detected replica:
pt-table-checksum
Nayak21 reputationPosted Sep 4, 2021, 9:32 AM EDT