Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

matthewamzn

macrumors member
Original poster
Jun 29, 2004
66
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.