Unable to connect to Mysql from php script.
I hv a small problem and i really hope you guys can help me out. Ok here i go:
Initially i had my web server and mysql server located locally(ip 22.214.171.124), and i used the following code to connect without any problem :
$dbhost = "localhost";
$dbname = "testdb";
$dbuser = "testuser";
$dbpassword = "testpwd";
$db = mysql_connect($dbhost, $dbuser, $dbpassword);
echo"Could not connect to database";
now my web server is located at 126.96.36.199 and mysql server at 188.8.131.52 i tried connecting to mysql using :
$dbhost = "184.108.40.206"; instead of localhost
but i'm getting this error msg :
MySQL Connection Failed: Can't connect to MySQL server on '220.127.116.11' (61)
does it mean tht the way i'm trying to connect is wrong ?
i hv a host in mysql user table as 18.104.22.168 with all grants .
please help me out.
thank you very much.