I'm trying to use the mysqldbcompare tool but getting a connection error:
$ mysqldbcompare --server1=client --skip-data-check db1:db2
# server1 on <ip>: ...
ERROR: Access denied for user 'root'@'<ip>' (using password: YES)
I can use mysql and connect just fine, though. I setup my creds using mysql_config_editor --host=<ip> --user=root --port=3306 --password and tested with the mysql command with and without passing all the args (mysql -u root -p -h <ip> -P 3306).
I've checked the bind address of the server and looked in the server error logs but it just reiterates a connection refused message. I've searched online (and on SO) but haven't been able to find anything.
Any help is appreciated.
When you encountered an access denied error it means the TCP connection has been established, but the password you provided is wrong for
'User'@'Host'(a User-Host pair is a real account for MySQL authentication, not a single username).Assume that MySQL server runs on
172.0.0.8and your local address is172.0.0.5.mysql.userby:SELECT * FROM mysql.user\G;. If you can't find either of these two User-Host pairs:'root'@'172.0.0.5'and'root'@'%', it means there is no such account. So you failed.mysqldbcompare --server1=root:[email protected]:3306 --skip-data-check db1:db2Check all these stuff step by step, and you will figure it out.