I understand that pt-table-checksum can do checksum compares between a master's DB and a slave's DB easily.

However, let's say your master has two slaves replicating from it for the same DB, i.e. Slave 1 and Slave 2.

Is there a way to use pt-table-checksum to run a direct checksum comparison between Slave 1 and Slave 2's databases? In this scenario, I am not as concerned with comparing any of the slaves with the master itself.

Thanks IS


If I'm not mistaken the pt-table-checksum uses report_host value to find slaves.

May I suggest:

  1. stop slave2. Note its current position.
  2. Temporarily set up slave2 to replicate slave1 (binglog needs to be enabled on slave1)
  3. Start only the io thread to get replication chain (i.e. start slave io_thread;)
  4. Run pt-table-checksum from slave1
  5. After check is done, stop slave and restore original replication on slave2 with saved position

This way you don't run the risk of messing up any slave.

| improve this answer | |
  • 1
    The idea is ok, but log-slave-updates should be disabled on slave 1, or replication may break. The binlog position calculation is not trivial, either. – jynus Oct 20 '14 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.