Bug #69570 | Host wildcard does not match 'localhost' | ||
---|---|---|---|
Submitted: | 25 Jun 2013 9:54 | Modified: | 28 Jun 2013 7:28 |
Reporter: | Dieter Van de Walle | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Security: Privileges | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[25 Jun 2013 9:54]
Dieter Van de Walle
[27 Jun 2013 15:33]
Hartmut Holzgraefe
Expected behavior, isn't it? As "localhost" in the MySQL privileges context does not refer to the 127.0.0.1 IP loopback address (or to any IP address at all) but to the Unix Domain Socket connection (usually via the socket file /tmp/mysql.sock) Combined with --protocol=TCP '%' should work as you expect though ... I'm pretty sure this properly documented in the online manual, too, but i'm too lazy to look it up right now ...
[27 Jun 2013 19:25]
MySQL Verification Team
Hello Dieter, Thank you for the report. As Hartmut pointed out, this is an expected behavior. Please reference the manual pge here - http://dev.mysql.com/doc/refman/5.5/en/connecting.html Please also see - Bug #36576, Bug #31061 Thanks, Umesh
[28 Jun 2013 7:28]
Dieter Van de Walle
The relevant line seems to be, the trivially mentioned fact: "For example, connections on Unix to localhost are made using a Unix socket file by default." I must say this is utterly confusing though!
[26 Apr 2018 20:21]
Mircea Zahan
Damn, this has been eluding me for years! Ok, so basically localhost is not handled through TCP while % only matches TCP connections. What about Windows? The behaviour is the same, yet I'm pretty sure that Windows's localhost is handled through TCP.