PDA

View Full Version : Use Remote mysql Database?




matthewamzn
Jun 12, 2006, 12:44 PM
I'm trying to retrieve data from a remote mysql database to use in a php page, but I can't connect to it.

$conn = mysql_connect ("remoteserverip", db_username, db_password)
or die ('could not connect. ' . mysql_error());
mysql_select_db (db_name, $conn);

I'm using the Plesk control panel. I do ssh into the server to create mysqldumps, but I haven't connected in this way before.



Coolnat2004
Jun 12, 2006, 04:54 PM
Remote MySQL connections are usually disabled due to the security risk that they pose..