I'm working on a site where I need to connect to a mysql database on a different server to the one where the script is held.
I keep getting a message saying: Warning: MySQL Connection Failed: "Host '#ipaddress_that_script_iso_n#' is not allowed to connect to this MySQL server in db.php on line 8".
Any ideas or advice greatly appreciated. Thanks,
Try this one:
$Conn1 = mysql_connect("oneserver.com","*","*");
$Conn2 = mysql_connect("otherserver.com","**","**");
When doing queries, specify the connection:
$sqlQuery = mysql_query("SELECT * FROM fLIPIS",$Conn1);
Hope it helps
fLIPIS
You have to set the permissions on the remote mysql server.
e.g.:
grant all on . to yourusername@[IP of server you are connecting from] indentified by 'your password';
Of course you should replace 'all' with only those permissions you need and '.' with those DBs.tables you need access to.