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