Mysql connections hanging in login state

Try to add skip-name-resolve to [mysqld] section of /etc/my.cnf like this:

[mysqld]
skip-name-resolve

Seems to be a name resolving issue.