Mysql – pt-table-checksum from remote server

MySQLpercona-tools

I am using pt-table-checksum for the first time and have some questions that I can't seem to resolve by reading the documentation on Percona's website.

Per the documentation, pt-table-checksum performs an online replication consistency check by executing checksum queries on the master. Does this script have to be run on the master? Can I run from another server that has no MySQL installed? I tried this:

pt-table-checksum –host=mysqlistance –user=user –password=password –replicate-check-only

But I get some errors indicated that it is unable to connect to the localhost. However, it specifies the IP instead of localhost.

Best Answer

You need to use a mysql user that has permissions from the host your executing the script from.

Run select user, host from mysql.user on the database to see if your user has an entry for the IP you're connecting from. If not, you will have to grant permissions to the user for that host.