Http://blog.csdn.net/wenbingcai/article/details/2401858
1. MySQL remote connection is slow or cannot be connected at all 2. log on to the MySQL console locally and show processlist. Many processes are displayed, similar | 145 | unauthenticated user | 61.129.57.158: 1672 | null | connect | null | login | null | | 146 | unauthenticated user | 222.73.4.114: 1250 | null | connect | null | login | null | | 147 | unauthenticated user | 222.73.19.148: 48308 | null | connect | null | login | null | 3. Frequent failure to stop MySQL |
Solution |
The reason for the above situation is that When the MySQL server receives a remote IP address access, it will check the reverse resolution of the IP address by default. This lookup process will be slow. If the IP address is not reversed, MySQL may also be stuck in this connection. As a result, a large number of connections in the connect status appear in MySQL, affecting MySQL usage.There are two solutions to prevent this problem. 1. Add a line of skip-name-resolve in the [mysqld] section of my. CNF to skip reverse resolution. 2. Write the remote IP address in the/etc/hosts file, so that reverse resolution can be quickly found during reverse resolution. |