Install and use the Percona Toolkit in the slave?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Install and use the Percona Toolkit in the slave?


    I am considering to use the toolkit to make checks on the integrity of one replication (1 master, 1 slave) but i don't know if it is possible to use pt-table-checksum in the slave, ¿is it possible?

    I want to do this because the master is a windows server 2008 and the slave is a ubuntu 12.04 and, as far i understand, it's not possible to install it in a windows OS.

  • #2

    You can install percona toolkit on the slave server but then you have to run pt-table-checksum against the master server. That is possible because pt-table-checksum can connect to remote servers. The usage is:

    pt-table-checksum [OPTIONS] [DSN]

    so from the slave you can run:

    pt-table-checksum h=ip_of_the_master,u=user,p=password



    • #3
      Thanks for the answer, now i'm testing it with some extra options:

      pt-table-checksum --lock-wait-time=50 --no-check-binlog-format --no-check-replication-filters -h132.247.164.1 -u -p -P

      I'm using it and it only shows the following again and again:

      Waiting for the --replicate table to replicate to ...

      It's been almost 50 min. since it started, and i have only 4 databases very small and with almost no users making changes

      Also the master is mysql 5.1 and the slave is mysql 5.5.

      So now my question is, ¿what is making that, at least aparently, it's not doing anything:
      the difference between versions or maybe the innodb_lock_wait_timeout=50 on both servers or is another thing?


      • #4
        The first thing to check are replication filters. The checksum results is stored in percona.checksum by default so check that the table is also created on the slave server. Do you have any filter that prevents that checksum table or percona database from being replicated to slave servers? binlog-do-db, replicate-do-db and so on.

        Also, you can enable the debug of percona toolkit with:

        export PTDEBUG=1

        Then run again the pt-table-checksum and you will get a more verbose output that can help you to diagnose where is the problem.


        • #5
          You were right, it was the replication filters, i wasn't replicating the percona database so i just added it in the my.cnf file and it worked fine.

          Thanks a lot for your help.