I'm trying to use mysqldump on a remote host. My local IP is 18.104.22.168, and the remote IP is 22.214.171.124 I run this command:
mysqldump --host=126.96.36.199 -u user test_db
This doesn't work as what I get back this error:
mysqldump: Got error: 1045: Access denied for user 'user'@'188.8.131.52' (using password: NO) when trying to connect
So instead of connecting to the remote server, mysqldump tries to connect to the localhost.
Also, I noticed that when I replace the remote IP with another one, it tries to connect to that one.
Any idea why this happens?