mysql_connect access-denied

From: Date: Fri, 16 Jun 2000 09:33:49 +0000
Subject: mysql_connect access-denied
Groups: php.db 
Request: Send a blank email to php-db+get-441@lists.php.net to get a copy of this message
Dear Listeners, I'm new to mysql and php and have the following (basic ?) problem. From the Linux-commandline I can start mysql and connect to a database and select something from a table. I can do this as root and as dba. From a php-script I cannot. mysql_connect (localhost, user, password) says: Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: YES) in /usr/local/httpd/htdocs/verjaardag.php3 on line 7 Instead of localhost I tried the system's DNS-name but with no luck. mysql 3.22.32 PHP3 This is (part of) my code: <?php $host="localhost"; $user="root"; $password="xxxxxxxx"; $dbname="llodb"; if (!($link=mysql_connect ($host, $user, $password))) { print ("connect niet gelukt"); exit(); } if (!($sel=mysql_select_db ($dbname, $link))) { print ("select database niet gelukt"); exit(); } ....... etc. Please help me out. Derko Drukker

« previous php.db (#441) next »