View Single Post
Old February 16th, 2006, 5:37 PM   #2 (permalink)
mr_fern
All Ur Base R Belong 2 Us
Excelling Contributor
 
Joined in Feb 2005
Lives in Vegas & New York
830 posts
Gave thanks: 2
Thanked 7 times
Re: What's wronge with my database??!!!

Modify the script

This line:
mysql_select_db("$dbname") or die( "Unable to select database.");

Change it to:
mysql_select_db("$dbname") or die( mysql_error() );

P.S.

Have you made sure that you already granted the user privileges for the database? Sometimes people create the database, create the user, but forget to grant the user privileges to the database. This might very well be it.

In any case, just modify the php line to what I gave you and when you run the script it will give you a specific reason why it couldn't connect to the database.
__________________
Nobody doing nothing
mr_fern is offline   Reply With Quote