grim918
December 23rd, 2005, 05:24 PM
im having a problem connecting to my mySQL database with php, here is my code:
//connect to server and select database
$conn = mysql_connect("server_name","user","password") or die(mysql_error());
mysql_select_db("db_name",$conn) or die(mysql_error());
when i run the script i get an error saying that the connection was lost. does anyone know if permissions also need to be set to connect to the mySQL server.
//connect to server and select database
$conn = mysql_connect("server_name","user","password") or die(mysql_error());
mysql_select_db("db_name",$conn) or die(mysql_error());
when i run the script i get an error saying that the connection was lost. does anyone know if permissions also need to be set to connect to the mySQL server.