I'm trying to use mysqldump on a remote host. My local IP is 220.127.116.11, and the remote IP is 18.104.22.168 I run this command:
mysqldump --host=22.214.171.124 -u user test_db
This doesn't work as what I get back this error:
mysqldump: Got error: 1045: Access denied for user 'user'@'126.96.36.199' (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?