Bug #66071 | MySQL's treatment of hostnames is retarded | ||
---|---|---|---|
Submitted: | 28 Jul 2012 21:23 | Modified: | 29 Aug 2012 16:10 |
Reporter: | Josh Endries | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Security: Privileges | Severity: | S3 (Non-critical) |
Version: | All | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | authentication, MySQL, mysql-server, premissions, privileges |
[28 Jul 2012 21:23]
Josh Endries
[29 Jul 2012 16:10]
Valeriy Kravchuk
I think this case is clearly explained in the manual, http://dev.mysql.com/doc/refman/5.1/en/access-denied.html: "If you cannot figure out why you get Access denied, remove from the user table all entries that have Host values containing wildcards (entries that contain '%' or '_' characters). A very common error is to insert a new entry with Host='%' and User='some_user', thinking that this enables you to specify localhost to connect from the same machine. The reason that this does not work is that the default privileges include an entry with Host='localhost' and User=''. Because that entry has a Host value 'localhost' that is more specific than '%', it is used in preference to the new entry when connecting from localhost! The correct procedure is to insert a second entry with Host='localhost' and User='some_user', or to delete the entry with Host='localhost' and User=''." Read http://dev.mysql.com/doc/refman/5.1/en/account-names.html and http://dev.mysql.com/doc/refman/5.1/en/connection-access.html. Everything works exactly as documented. If you want to change documented behavior, that would be a feature request.
[30 Aug 2012 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".