Solve the problem of a large number of unauthenticated users in MySQL, unauthenticated
Recently, OJ and related open site operations have been exceptionally slow, causing a crash and no reason has been found!
Enter the database server, enter mysql, and useShow processlistCommand to view, found that there are a lot of unauthenticated user
Google,
This is a MySQL bug. no matter whether the connection is through hosts or ip address, MySQL will reverse query the DNS and IP address to the DNS. The reverse query speed is too slow.
(Whether it is a problem with the dns server provided by the isp or other reasons), a large number of queries are hard to cope with. If the thread is not enough, it will increase the thread, but it will not be released, therefore, MySQL will be "suspended ".
The solution is simple. End the reverse lookup process and prohibit any parsing.
Open the mysql configuration file (my. cnf) and add a line under [mysqld:
Skip-name-resolve
Reload the configuration file or restart the MySQL service.