Today due to accidental login MySQL server (the MySQL server is equipped with phpMyAdmin) to view the process (show processlist), I went to a large number of unauthorized users to connect to MySQL, the process results are as follows:
|13|unauthenticated user|10.135.26.100:42345| null| Connect| |login| null|
|14|unauthenticated user|10.135.26.100:42346| null| Connect| |login| null|
|15|unauthenticated user|10.135.26.100:42349| null| Connect| |login| null|
I have a go, this is the shrimp situation? Asked Baidu Google, the reason is: MySQL turned on the DNS reverse resolution, seemingly default installation will appear this dongdong. Problems found, natural problems will be solved.
1. Add--skip-name-resolve in startup parameter, turn off reverse Domain name resolution function
2. Increased skip-name-resolve in the [mysqld] section of MY.CNF
3. Add the corresponding host record in the/etc/hosts file
For convenience, add Skip-name-resolve in the [mysqld] section of f in the MySQL configuration file my.cnf, using scenario 2 directly. Option to disable DNS resolution, the connection speed is much faster. However, in this way, you cannot use the hostname in the MySQL authorization table, but only in IP format.
Using the –skip-grant-tables system will not make any access control to any user's access, but you can use mysqladmin flush-privileges or mysqladmin reload to open access control; The databases statement is open to all users,
If the MySQL server does not open a remote account, add Skip-grant-tables to the MY.CNF.
In Linux, the profile is/ETC/MY.CNF, and the configuration file under Windows is the My.ini file under the MySQL installation directory. Note that the configuration is added under [mysqld], after you change the configuration and save, then restart MySQL and connect to the test remotely, and everything is back to the same. The official explanation information for this parameter is as follows:
MySQL host query DNS is slow or a lot of client hosts will cause the connection is very slow, because our development machine is not able to connect the extranet, so DNS resolution is impossible, so also understand why the connection so slow. Also, note that after adding this configuration parameter, the Host field in the MySQL authorization table will not be able to use the domain name and can only use the IP address, because this is the result of the Forbidden Domain resolution