My code is simply:
$connection = new mysqli('52.62.xx.xx', $myUsr, $myPwd, $myDB, '3306');
The strange thing is that the IP address, or remote host, is being replaced with the IP address of my server, and I get the following error:
Access denied for user 'myUsr'@'107.191.xx.xx'
Why is mysqli trying to connect to 107.191.xx.xx
when I'm explicitly telling it to connect to 52.62.xx.xx
What am I missing here?
I don't think it's too relevant, but the remote host is an Amazon Aurora instance.
EDIT:
Ok, so on the HOST server I ran:
GRANT ALL PRIVILEGES ON *.* TO 'myUsr'@'107.191.xx.xx' IDENTIFIED BY 'password'
Now it works :)