Running pt-table-checksum on a table in different databases I'm using filters for replication:

replicate-wild-do-table = test_slave.%
replicate-rewrite-db = test-&gt;test_slave


Is there an option to specify different DB name on slave for "pt-table-checksum"

pt-table-checksum --host=localhost --databases=test --max-load=Threads_connected:25 --no-check-replication-filters


EDIT 1:

mysql&gt; SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'test_slave';
+----------+
| COUNT(*) |
+----------+
|      145 |
+----------+
1 row in set (0.00 sec)


mysql&gt; SELECT COUNT(*) FROM percona.checksums;
+----------+
| COUNT(*) |
+----------+
|       40 |
+----------+
1 row in set (0.00 sec)


EDIT 2:

# ls -l *.frm | wc -l
145
# ls -l | awk '{print $3,$4}' | uniq

mysql mysql


It's also complaining that two tables have no indexes and are oversized. It looks like it's just skipping some tables?
I don't see anything along those lines in the Percona Toolkit Documentation.

There is something you can do to cheat

Scenario


datadir is /var/lib/mysql
Master has test database
Slave has test_slave database


You could create a symbolic link in one of two ways

TECHNIQUE #1

On the Master, run

ln -s /var/lib/mysql/test /var/lib/mysql/test_slave
chown mysql:mysql /var/lib/mysql/test_slave


TECHNIQUE #2

On the Slave (if there is no test database), run

ln -s /var/lib/mysql/test_slave /var/lib/mysql/test
chown mysql:mysql /var/lib/mysql/test


NEXT STEP

Once you created the symbolic link, you can run the checksum against test

pt-table-checksum --host=localhost --databases=test --max-load=Threads_connected:25 --no-check-replication-filters


or against test_slave

pt-table-checksum --host=localhost --databases=test_slave --max-load=Threads_connected:25 --no-check-replication-filters


EPILOGUE

When done, you can remove the symbolic link.

Give it a Try !!!