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

**URL:** <https://forums.percona.com/t/pt-table-checksum-how-to-restrict-checks-to-specific-slaves/3238>\
**Category:** Percona Toolkit\
**Created:** [January 30, 2014, 9:02am UTC](https://forums.percona.com/t/pt-table-checksum-how-to-restrict-checks-to-specific-slaves/3238 "2014-01-30T09:02:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdanilson](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jdanilson](https://forums.percona.com/u/jdanilson)\
**Post date:** [January 30, 2014, 9:02am UTC](https://forums.percona.com/t/pt-table-checksum-how-to-restrict-checks-to-specific-slaves/3238/1 "2014-01-30T09:02:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mirfan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mirfan/32/16890_2.png) [@mirfan](https://forums.percona.com/u/mirfan)\
**Post date:** [January 31, 2014, 4:55am UTC](https://forums.percona.com/t/pt-table-checksum-how-to-restrict-checks-to-specific-slaves/3238/2 "2014-01-31T04:55:55Z")

</div>

pt-table-checksum [–recursion\_method](http://www.percona.com/doc/percona-toolkit/2.2/pt-table-checksum.html#cmdoption-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.

```auto

pt-table-checksum --recursion-method=dsn=D=percona,t=dsns --host=127.0.0.1

```

---

<div class="post-metadata">

**Author:** ![jdanilson](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jdanilson](https://forums.percona.com/u/jdanilson)\
**Post date:** [January 31, 2014, 8:18am UTC](https://forums.percona.com/t/pt-table-checksum-how-to-restrict-checks-to-specific-slaves/3238/3 "2014-01-31T08:18:35Z")

</div>

Thanks for the info. It worked like a champ!

---

<div class="post-metadata">

**Author:** ![mbopparaju](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@mbopparaju](https://forums.percona.com/u/mbopparaju)\
**Post date:** [February 19, 2014, 3:06pm UTC](https://forums.percona.com/t/pt-table-checksum-how-to-restrict-checks-to-specific-slaves/3238/4 "2014-02-19T15:06:31Z")

</div>

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](http://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

---

<div class="post-metadata">

**Author:** ![Manny54](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@Manny54](https://forums.percona.com/u/Manny54)\
**Post date:** [March 2, 2014, 3:37pm UTC](https://forums.percona.com/t/pt-table-checksum-how-to-restrict-checks-to-specific-slaves/3238/5 "2014-03-02T15:37:39Z")

</div>

that worked, cheers

* * *

[Poker Bots](http://www.pokercheat.org/poker-bots/shanky-holdem-poker-bot/)
