By default, mysql will automatically reverse parse. If we cannot handle the problem, we will find a large number of unauthenticated user prompts when viewing show processlist, the following describes how to solve unauthenticated user.
Example
The Code is as follows: |
Copy code |
Mysql> show processlist; | 20681949 | unauthenticated user | A. B .C.D: 52497 | NULL | Connect | Reading from net | NULL | | 20681948 | unauthenticated user | W. X.Y. Z: 52495 | NULL | Connect | Reading from net | NULL | |
How many unauthenticated users try to log on to mysql? R. When this happens unlimitedly, the system will be very slow.
I learned from the official mysql website that this is a special setting on an official system. I thought of it as a mysql bug. No matter whether the link is through the hosts or IP mode, he will reverse query the DNS. mysqld will try to reverse query the IP address-> dns, because reverse query resolution is too slow, you cannot cope with excessive queries.
If a large number of illegal users attempt to log on to MySQL on the Internet, the load on the server is unimaginable.
Solution:
1. execution:
The Code is as follows: |
Copy code |
#/Usr/local/mysql/bin/mysqld_safe -- skip-name-resolve -- user = mysql &
|
Ii. Modify the MySQL configuration file my. cnf
Append:
The Code is as follows: |
Copy code |
[Mysqld] Skip-name-resolve |