Not the answer you need?
Register and ask your own question!

pt-table-checksum how to restrict checks to specific slaves

jdanilsonjdanilson EntrantInactive User Role Novice
I have 6 servers. A & B are master<->master replicates. A1 and A2 are slaves from A. B1 and B2 are slaves from B.

I want to run pt-table-checksum to compare tables between A & B. I don't care about the read only slaves, A1, A2, B1, and B2. (In fact, from A the 3306 port to A1 is not open so I cannot even get to A1 from A but obviously I can reach A from A1.) I cannot seem to figure out how to restrict pt-table-checksum from considering A1 and A2 and everytime I run the utility it generates errors trying to reach A1 and A2 yet never seems to do the compare to B. I'm sure this is operator error.

Thanks.

Comments

  • mirfanmirfan Database Administrator Inactive User Role Beginner
    pt-table-checksum --recursion_method is appropriate in this scenario. You need to create dsns table under percona database and create a record for slave with host, username,password,port under dsn column in dsns table and finally need to mention where the dsn table is and specify master credentials. something like as follows.
    pt-table-checksum --recursion-method=dsn=D=percona,t=dsns --host=127.0.0.1
    
  • jdanilsonjdanilson Entrant Inactive User Role Novice
    Thanks for the info. It worked like a champ!
  • mbopparajumbopparaju Entrant Inactive User Role Beginner
    Hi, I was encountering the same error in running the pt-table--checksum tool. However, after being able to get through this issue, Now, another issue I am dealing with is the error below:

    Waiting for the --replicate table to replicate to c.y.a.com...

    So, is it necessary to create a "percona" database and "checksums" table on the slave too? They do exist on the master server right now. Is there a work-around to this issue when we are not able to create the database/tables on the slave? I am storing he credentials for accessing the slave in the dsns tables of the percona database.

    The command I am using is as follows:

    pt-table-checksum 'h=host1,u=user1,p=password' -d esmpd_cidr_ext_prod --tables release_schedule --recursion-method=dsn='h=host1,D=percona,t=dsns' --nocheck-replication-filters --set-vars innodb_lock_wait_timeout=50
  • Manny54Manny54 Entrant Inactive User Role Beginner
    that worked, cheers
    ______________
    Poker Bots
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.