Most likely the user that you're logging in as (ie no username or password specified) doesn't have permission to open the database in question.
Best way to test it out is *temporarily* put your root username and password into your mysql_connect function call. If you can access the database it's a permissions problem. -----Original Message----- From: Nik Alleyne [mailto:[EMAIL PROTECTED]] Sent: April 10, 2002 09:56 To: [EMAIL PROTECTED] Subject: [PHP-WIN] Another Newbie Question Good evening everyone, I am new (very new) to php. I was doing some research on the net and learn of this packaged and after reading just a couple of pages, i figure i should learn this instead of ASP. It looks so easy. Anyhow here is my problem. I am trying to connect to the database (MySQL) however, I can't I am connecting to the server, but I cannot connect to my sample database. Here is my script? <?php mysql_connect("nik", "", "") or die("could not connect to the database"); mysql_select_db("guestbook") or die ("could not connect to the specified database"); ?> I'm getting the "could not connect to the specified database" message. P.S. The database exists. Please Help Thx Nik -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php