We were having a problem with hundreds of connections to the mysql server that seemed to be stuck in the connect login state.
The problem was connections took a very long time because mysql does a DNS lookup on the IP address of the connecting host and because this was a private IP it was timing out.
There are two answers to this:
- Add --skip-name-resolve to my.cnf or
- Create entries in /etc/hosts, eg:
10.0.0.10 hostname.private
See this page
