Reputation: 119
Continue to get Access Denied errors when running pt-table-sync
on mysql databases holding tables that pt-table-checksum
found differences in the replicated tables.
[mysql@node1:0 ~]$ pt-table-sync --execute --verbose master.com slave.com -uroot -ppasswd
DBI connect(';host=master.com;mysql_read_default_group=client','root',...)
failed: Access denied for user 'root'@'master.com' (using password: YES) at /usr/bin/pt-table-sync line 2163
Running it from master server.
Any ideas what I'm doing wrong?
Upvotes: 1
Views: 2231
Reputation: 1536
It must be the way the tool is connecting to the server. Make sure any symbols or other characters in your password are escaped. Also, if you are connecting from a remote server, check to see if root access is enabled. Check out this blog article for how to deal with the latter.
According to the MySQL docs:
If you get the following error, it means that you are using an incorrect root password:
shell> mysqladmin -u root -pxxxx ver Access denied for user 'root'@'localhost' (using password: YES) If the preceding error occurs even when you have not specified a password, it means that you have an incorrect password listed in some option file. Try the --no-defaults option as described in the previous item.
For information on changing passwords, see Section 6.3.5, “Assigning Account Passwords”.
If you have lost or forgotten the root password, see Section C.5.4.1, “How to Reset the Root Password”.
Also perhaps helpful:
You can suppress the use of option files by a client program by invoking it with the --no-defaults option. For example:
shell> mysqladmin --no-defaults -u root version The option files that clients use are listed in Section 4.2.3.3, “Using Option Files”. Environment variables are listed in Section 2.13, “Environment Variables”.
Upvotes: 0