Bug #27361 | Using localhost with ssh port forwarding failes to connect -- must use 127.0.0.1 | ||
---|---|---|---|
Submitted: | 21 Mar 2007 21:59 | Modified: | 22 Mar 2007 18:18 |
Reporter: | Marc Harris | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL GUI Common | Severity: | S3 (Non-critical) |
Version: | 5.0r10 (of GUI Tools) | OS: | Linux (Linux (Suse 10.2)) |
Assigned to: | CPU Architecture: | Any |
[21 Mar 2007 21:59]
Marc Harris
[22 Mar 2007 8:50]
Sveta Smirnova
Thank you for the report. But it is because the MySQL Access Privilege System treats localhost value in special way. All clients behaves in such mode. See also http://dev.mysql.com/doc/refman/5.0/en/connection-access.html
[22 Mar 2007 16:03]
Marc Harris
I changed the category to "MySQL Network" since I agree it is not a GUI specific issue, and I wasn't sure where else to put it. I reopened it because, respectfully, I still think that this is the incorrect behavior. It seems to me that this is an unintended consequence of an optimization. I understand that the specification says that things work this way, but I maintain that the specification is therefore wrong, even though the implementation conforms to it. "localhost" is not a special MySQL keyword; it's a standard network name. To treat an attempt to connect to localhost:12306 as if it were an attempt to connect to a local server that is listening on port 3306 is not the correct behavior. No other software I've ever seen behaves this way; the MySQL windows client doesn't behave this way; it is non-standard and very unobvious. While sticking to the standard way of doing things is not always the correct thing to do, there typically needs to be a good reason for it.
[22 Mar 2007 18:18]
Sveta Smirnova
Sorry, but this feature has been decided years ago and could not be changed without breaking many applications. >the MySQL windows client doesn't behave this way; Read about difference between Windows and UNIX clients behaviour here: http://dev.mysql.com/doc/refman/5.0/en/invoking-programs.html I also reverted category of bug report, because "MySQL Network" is service (see also http://www.mysql.com/products/enterprise/whats_new.html) and not category to report about connection issues.