Access denied for user: '@localhost'
| From: | Sean Burlington | Date: | Tue, 03 Jun 2003 12:36:22 +0000 |
| Subject: | Access denied for user: '@localhost' | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-28256@lists.php.net to get a copy of this message | ||
Hi,
this problem seems to have appeared after a system upgrade ...
command line works fine
mysql -uschool -pbonfire school
BUT
<?php
/* Connecting, selecting database */
$link = mysql_connect("localhost", "school", "bonfire")
or die("Could not connect : " . mysql_error());
print "Connected successfully";
mysql_select_db("school") or die("Could not select database". mysql_error());
?>
results in the following error
Connected successfully
Could not select database
Access denied for user: '@localhost' to database 'school'
the logfile shows this ...
030602 18:47:01 33 Connect sean@localhost as anonymous on
33 Init DB Access denied for user: '@localhost' to database 'school'
33 Quit
Any ideas why the connection is being made as anonymous instead of with the details supplied ???
I'm running debian/testing which is up to date and all relavent systems are default install with some config changes...
I've tried re-building from scratch apache + php using the latest tarballs (installed to a different location) and still get the same error
I've also tried connecting to a different mysql server (same error) - in fact php still tries to connect to localhost !
I'll try installing a new version of mysql ... but any other ideas would be much appreciated
--
Sean