Thread: MySQL Dilemma
View Single Post
Old 12-29-2003, 06:59 PM  
CS-Jay
Confirmed User
 
CS-Jay's Avatar
 
Join Date: Oct 2003
Location: Command Central, West Palm Beach, Fl
Posts: 1,794
use this one:

if(!($dbcon = mysql_pconnect("localhost", "username", "password")))
{
print("Failed connection 1 \n");
exit();
}
//select db
if(!mysql_select_db("dbname", $dbcon))
{
print("Failed connection 2 \n");
exit();
}

and don't forget to flush privileges.

and as a tip, you should not be using root to connect to your db, you should create another user.
__________________
I do stuff - aIm CS_Jay_D
CS-Jay is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote