Sequelpro: You have entered 'localhost' for a non-socket connection

Created on 23 Oct 2017  路  2Comments  路  Source: sequelpro/sequelpro

I understand this has been reported a number of times, but it's _still_ a bug.

The issue is, I want to SSH tunnel to a vagrant box and I do not want to have to work around the bug by logging in as root and GRANT the user access to 127.0.0.1 - the ssh tunnel will work using localhost but this software does not allow for that and it's really frustrating, especially when the error is:

To MySQL, 'localhost' is a special host and means that a socket connection should be used.

That's completely invalid and irrelevant 馃槦

Duplicate

Most helpful comment

Granted I was frustrated at the fact that because of this error I lost a bit of time resetting the root password on mysql (in vagrant). I should not have needed to do this (if I consider using it on other environments changing all the hosts is just not a viable solution).

Is there any reason for the hardcoded error message though? Because MySQL Workbench can connect to a server via SSH tunnel using host localhost, i'm therefore unsure why SequelPro refuses to connect to mysql on localhost via an ssh tunnel.

All 2 comments

That's completely invalid and irrelevant 馃槦

No, it is not and I could even prove it to you with the source code of the official mysql client library (which we use).
If you give MySQL the hostname "localhost" to connect to, it WILL attempt a socket connection and that's it.

Second, and I've explained that over and over again, it doesn't even matter to the server!
MySQL doesn't send "127.0.0.1" or "localhost" or whatever you type as the hostname to the server.
The server makes a completely independent decision on whether a client comes from "127.0.0.1" or "localhost" and if --skip-name-resolve is set, that decision is very simple:
A socket connection comes from localhost and everything else comes from a.b.c.d

So you either remove that option, in which case 127.0.0.1 and localhost are equivalent or you'll have to wait for #2054

Duplicate of #1146

Granted I was frustrated at the fact that because of this error I lost a bit of time resetting the root password on mysql (in vagrant). I should not have needed to do this (if I consider using it on other environments changing all the hosts is just not a viable solution).

Is there any reason for the hardcoded error message though? Because MySQL Workbench can connect to a server via SSH tunnel using host localhost, i'm therefore unsure why SequelPro refuses to connect to mysql on localhost via an ssh tunnel.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sequelpro picture sequelpro  路  3Comments

sequelpro picture sequelpro  路  5Comments

aacook picture aacook  路  4Comments

yuchunc picture yuchunc  路  5Comments

jeffcross picture jeffcross  路  4Comments