Bug #59139 User with acces from any host can't login on localhost
Submitted: 23 Dec 2010 18:22 Modified: 24 Dec 2010 0:27
Reporter: thierry bela Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: General Severity:S1 (Critical)
Version:5.5.8 OS:Any
Assigned to: CPU Architecture:Any
Tags: access, community, login, MySQL, remote, server, user

[23 Dec 2010 18:22] thierry bela
Description:
User with acces from any host can't login on localhost, first reported here User with acces from any host can't login on localhost

I have the same issue on windows

How to repeat:

If I try to login from a remote host (mysql -u myuser -p --host=<ip-of-remote-mysql-server>), I don't have any problem. 

But when I execute the same command on the server (mysql -u myuser -p --host=localhost), I got an error ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using password: YES) 

the bug appear when I try to connect from mysql windows client libraries but not on linux client
[23 Dec 2010 18:48] thierry bela
trying to login on the same machine without specifying host will result in a failure.

mysql -u myuser -p
[23 Dec 2010 19:58] Peter Laursen
Not reproducible for me.  I have user 'nn'@'%' and can login from local client.

Are you sure that uou do not have a 'user'@'localhost' or 'user'@'127.0.0.1' with other authentication details?  If you have 'user'@'localhost' or 'user'@'127.0.0.1' then you cannot use 'user'@'%' from localhost (if you *don't have* such you can).

Try to execute: SELECT user, host FROM `mysql`.`user`;

Peter
(not a MySQL person)
[24 Dec 2010 0:27] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Please read at http://dev.mysql.com/doc/refman/5.5/en/connecting.html how mysqld handles connections with default host on UNIX which is localhost.