vieten / sequel-pro

Automatically exported from code.google.com/p/sequel-pro
Other
0 stars 0 forks source link

Grant for localhost, but seqel pro requires 127.0.0.1 or socket connection. #1226

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Great a grant for a user only over localhost, not 127.0.0.1.
2. Create an SSH connection in Seqel Pro to that mysql server (not a socket)
3. Constantly told to use socket or 127.0.0.1.

What is the expected output? What do you see instead?
The grant is for localhost, not 127.0.0.1. MySQL doesn't treat localhost and 
127.0.0.1 as equivalent so I can't connect to my database.

What version of Sequel Pro are you using? What version of MySQL are you
connecting to on the server? Seqel Pro 0.9.9.1 with MySQL 
5.1.46sp1-enterprise-gql-pro-log

Original issue reported on code.google.com by unnc...@gmail.com on 7 Nov 2011 at 4:29

GoogleCodeExporter commented 9 years ago
+1 on this, started affecting me just yesterday after server changes.

SP automatically rewrites a MySQL host of "localhost" to 127.0.0.1, but in 
terms of MySQL permission grants they are not the same. I think it's trying to 
be a little too smart - it should use the host name exactly as specified and 
let the hosts file/dns do their things. 

Original comment by firehed on 9 Nov 2011 at 10:30

GoogleCodeExporter commented 9 years ago
The reasoning is this:

When you tell MySQL to connect to "localhost" it will ALWAYS use sockets. This 
is hardcoded in mysql - to make an IP connection you will have to connect to 
127.0.0.1

Now, as long as you start a mysql server without the "--skip-name-resolve" 
option (this is default) "localhost" and "127.0.0.1" are equal. If that option 
is specified those are two different hosts.

However over SSH there is no sockets, and hence you can't connect to 
"localhost" over SSH as MySQL would always try to connect via socket to your 
local client.

Some users tell us that this works in other clients which we could not verify 
(in our tests other clients behaved exactly the same as Sequel Pro). If you 
think you have found such a case contact us per mail with login details to your 
server. 

Original comment by schlabbe...@gmail.com on 15 Mar 2012 at 8:56

GoogleCodeExporter commented 9 years ago
Closing after no further feedback.

Original comment by stuart02 on 29 Apr 2012 at 8:33

GoogleCodeExporter commented 9 years ago
I reached out to sequelpro@northofthree.com as per #2 with some more details 
but never heard anything back.

Original comment by unnc...@gmail.com on 2 May 2012 at 12:43

GoogleCodeExporter commented 9 years ago
Trawled through my email, and so you did - sorry, must have missed that one due 
to busy-ness.  Will reply via and track in email for the time being, will 
update this later with results...

Original comment by rowanb@gmail.com on 2 May 2012 at 12:51