According to the error it looks like you are using the wrong IP Address or the wrong port. Make sure the IP Address is correct and if that dont work try to specify and force connection with the default port 3306. Not sure , but you may have to open another port to support the other connection.
PHP Code:
$link = mysql_connect("$host:3306", "mysql_user", "mysql_password");
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);