Category — Mysql
Mysql Unable to Connect via IP
I have had this issue in the past, and again it reared it’s ugly head tonight on a different set of servers. Basically you have a situation where you are able to connect to Mysql via the socket, however when you try to connect using the ip with the -h flag the connection just hangs. What I have found this issue is caused by is that the Mysql server is unable to resolve the IP addresses of the connecting servers, and just hangs doing hostname lookups.
You can tell mysql to skip these hostname lookups (which solves the problem) by adding to your my.cnf file:
skip-name-resolve
Hopefully this comes in handy for someone down the road.
December 16, 2008 No Comments