MySQL Connect Problem

From: Date: Thu, 06 Jul 2000 19:14:26 +0000
Subject: MySQL Connect Problem
Groups: php.general 
Request: Send a blank email to php-general+get-5266@lists.php.net to get a copy of this message
I am using a PHP script to connect to the database for user authentication (using PHP4 Sessions BTW - woohoo!), except I'm having a bit of trouble getting the connection to work. I receieve the following error message (Access denied for user: '@localhost' to database 'C003703'), which leads me to believe that I'm having a problem with one of the following things: 1) i should not be connecting to localhost, but rather the exact mysql address (mysqldb.[myhost].org -- although localhost should work. 2) my username/password is incorrect, although that can't be it since MySQL admin works fine through the web 3) i am connecting to the wrong database. any help you can give me would be immensely appreciated. The code I am using for the connection below: function db_connect() { global $sys_dbhost,$sys_dbuser,$sys_dbpasswd; $conn = mysql_connect($sys_dbhost,$sys_dbuser,$sys_dbpasswd); if (!$conn) { echo mysql_error(); } return $conn; Thanks, Jeff

« previous php.general (#5266) next »