Bug #10873 user name can be unknown in access denied message
Submitted: 25 May 2005 23:06 Modified: 26 May 2005 13:15
Reporter: David Dick Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.11 OS:Linux (Red Hat 7.3, Debian)
Assigned to: CPU Architecture:Any

[25 May 2005 23:06] David Dick
Description:
The server appears to not retrieve the current user name when denying access

How to repeat:
./configure
make
make test
make install
echo 'create database foo' | mysql -u root
echo 'grant all on foo.* to foo; ' | mysql -u root
echo 'use foo' | mysql -u foo

produces an error message of 

ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'foo'

Suggested fix:
Access denied message should be able to produce the name of the user that is being denied access.
[26 May 2005 13:15] MySQL Verification Team
Thank you for the report, but this is not a bug.

This error means you was authenticated as anonymous user.
Please, read carefully the following section of the manual:
http://dev.mysql.com/doc/mysql/en/connection-access.html