This might be a stupid idea, but did you remember to issue the Flush Privelages; 
command to the mysql database after granting your user all the rights?

Christian Schlaefcke <[EMAIL PROTECTED]> wrote:
Hi Folks,

I want to do something like the following:
$db = mysql_connect("localhost", "myuser") or die("Connect failed : " .

mysql_select_db("mydb",$db) or die("SELECT_DB failed : " . mysql_error

$result = mysql_query("SELECT * FROM mytable", $db) or die("Query
failed : " . mysql_error());

The script does not proceed beyond the "mysql_select_db" line. I get
this error:
SELECT_DB failed: Access denied for user ''@'localhost' to database

What happened to the user information. I have granted all neccessary
rights to "myuser". But it seems that itīs even not caring about the

I have MySQL 4.1.4 and PHP 4.3.8-2.1 on a Fedore Core 2 System running.

Thanks & Regards,


PHP Database Mailing List (
To unsubscribe, visit:

Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

Reply via email to