Did you check the mysql db, host, and user tables to make sure that 'localhost' and 'administrator' have appropriate permissions to use your desired database? This issue caused me much frustration until I had things set right. You should see something like the following. I'm assuming that your PHP application and your mysql db live on the same box. If it's a PHP issue, then I don't know what to advise you since I don't know PHP.
mysql> use mysql; mysql> select * from user; +-------------------------+----------+------------------+-------------+- ------------+-------------+-------------+-------------+-----------+----- --------+---------------+--------------+-----------+------------+------- ----------+------------+------------+ | Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | +-------------------------+----------+------------------+-------------+- ------------+-------------+-------------+-------------+-----------+----- --------+---------------+--------------+-----------+------------+------- ----------+------------+------------+ | localhost | administrator | | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | mysql> select * from host; +-------------------------+-------+-------------+-------------+--------- ----+-------------+-------------+-----------+------------+-------------- ---+------------+------------+ | Host | Db | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_priv | Alter_priv | +-------------------------+-------+-------------+-------------+--------- ----+-------------+-------------+-----------+------------+-------------- ---+------------+------------+ | localhost | your_db_name | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | mysql> select * from db; +-------------------------+---------+----------+-------------+---------- ---+-------------+-------------+-------------+-----------+------------+- ----------------+------------+------------+ | Host | Db | User | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_priv | Alter_priv | +-------------------------+---------+----------+-------------+---------- ---+-------------+-------------+-------------+-----------+------------+- ----------------+------------+------------+ | localhost (you could try % if the box isn't visible to anyone but you) | your_db_name | administrator | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | -----Original Message----- From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 9:05 AM To: [EMAIL PROTECTED] Subject: Some PHP - mySQL help please ... new to both I am very new to both PHP and mySQL. Any help would be greatly appreciated. While running this code I get following fatal error. PHP is installed and running correctly on the server. mySQL I THINK is running properly. I created a table and this code is from a tutorial I am trying to run through for discussion threads. No matter what I make the connection as (admin or nobody) I still get the same result, which leads me to believe that there is something wrong with the coding. I am too new to this to debug. Line 5 of the dbconnect.php file is where the script stops. again any help would be greatly appreciated. <? LINE 5 >>> if (!($mylink = mysql_connect ("localhost","administrator",""))) { print "<h3>could not connect to database</h3>\n"; exit; } mysql_select_db("mytest"); ?> RESULT>>> while trying to run script. Fatal error: Maximum execution time of 60 seconds exceeded in dbconnect.php on line 5 Thank You <><><><><><><><><><><><><><><><> Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com <><><><><><><><><><><><><><><><> --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php