Possible Duplicate:
Connecting to remote MySQL server using PHP
I can successfully connect to a database using localhost while the code is on the server where the MySQL is.
I want to connect to the same MySQL server, but from another IP:
mysql_connect("localhost","root","<password>");
mysql_select_db("db name");
But say my new IP is 12.123.123.12
I tried:
mysql_connect("12.123.123.12","root","<password>");
mysql_select_db("db name");
What am I doing wrong?