6

Suddenly today, I had an issue with connections to mysql hanging when connecting by IP address (e.g. mysql -h 10.1.248.20), but I could still connection using localhost fine, regardless the user.

mysql> show processlist;
+----+----------------------+------------------+------+---------+------+-----------------------------------------------------------------------+------------------+
| Id | User                 | Host             | db   | Command | Time | State                                                                 | Info             |
+----+----------------------+------------------+------+---------+------+-----------------------------------------------------------------------+------------------+
|  1 | system user          |                  | NULL | Connect |   10 | Connecting to master                                                  | NULL             |
|  2 | system user          |                  | NULL | Connect |   10 | Has read all relay log; waiting for the slave I/O thread to update it | NULL             |
| 37 | unauthenticated user | 10.1.248.3:36694 | NULL | Connect | NULL | login                                                                 | NULL             |
| 38 | unauthenticated user | 10.1.248.3:36695 | NULL | Connect | NULL | login                                                                 | NULL             |
| 39 | unauthenticated user | 10.1.248.3:36696 | NULL | Connect | NULL | login                                                                 | NULL             |
| 40 | root                 | localhost        | NULL | Query   |    0 | NULL                                                                  | show processlist |
+----+----------------------+------------------+------+---------+------+-----------------------------------------------------------------------+------------------+
6 rows in set (0.00 sec)

Yes, I realize replication was broken in that output above; that was after I tried restart MySQL (it was an emergency).

And as suddenly as things stopped working, they started working again.

DNS was working fine at the time. Replication was still working. MySQL was responsive.

Does anyone have any idea what would cause MySQL logins from remote IPs to hang suddenly?

1 Answer 1

7

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.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .