Bug #54469 User with host mapped to localhost will not be able to log in
Submitted: 13 Jun 2010 15:10 Modified: 24 Jul 2010 21:11
Reporter: Pavel Bazanov Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.47 OS:Windows
Assigned to: CPU Architecture:Any
Tags: create user, grant, hosts, localhost

[13 Jun 2010 15:10] Pavel Bazanov
Description:
Hello,
If I map some host name to localhost (in hosts file in Windows), and then create a user with the host set to that mapped hostname, then the user will not be able to log in.

How to repeat:
Note, that I have the following string in the hosts file:
127.0.0.1	DBHost

mysql> CREATE USER 'bltuser'@'DBHost' IDENTIFIED BY 'TestPassword';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'bltuser'@'DBHost' IDENTIFIED BY 'TestPass
word';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> exit;
Bye

c:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -ubltuser -pTestPassword -hDBH
ost
ERROR 1045 (28000): Access denied for user 'bltuser'@'localhost' (using password
: YES)
[15 Jun 2010 6:00] Sveta Smirnova
Thank you for the report.

But version 5.1.38 is old. Please try current version 5.1.47 and inform us if problem still exists.
[15 Jun 2010 12:07] Pavel Bazanov
Thank you for your answer.

Yes, the problem still exists in 5.1.47.
[16 Jun 2010 19:20] Sveta Smirnova
Thank you for the feedback.

Set OS to Windows, because this is not repeatable on Mac.
[18 Jun 2010 7:17] Sveta Smirnova
Verified as described on Windows.
[24 Jul 2010 21:11] Pavel Bazanov
Hi,
I see, that, unfortunately, nobody is assigned to the task.. Why?
[26 Jul 2010 6:48] Georgi Kodinov
Pavel,

Thanks for reporting this problem to us. We're trying as hard as we can to address all the bugs reported by our users. I don't have an estimate yet as to when we can address the problem in this bug report. If you are an Sun or Oracle customer, please escalate it if you need it fixed in an expedited manner.
Thanks for your patience.