I found that if the skip-name-resolve mode is enabled in mysql, some warning information may appear. This problem is caused by some configuration problems that we should simply delete.
When mysql enables the skip-name-resolve mode, there is a Warning solution. If your authorization is for all hosts, you will not encounter this problem.
When optimizing MYSQL configuration, add skip-name-resolve to check the startup log when you restart MYSQL. Warning Information is found.
121126 11:57:22 [Warning] 'user' entry 'root @ localhost. localdomain 'ignored in -- skip-name-resolve mode.
121126 11:57:22 [Warning] 'user' entry '@ localhost. localdomain 'ignored in -- skip-name-resolve mode.
Skip-name-resolve is to disable dns resolution to avoid network DNS resolution errors that may cause access to MYSQL. It should generally be enabled. After it is enabled, you cannot use the host name in the mysql authorization table. You can only use IP addresses. The warning is that the mysql table already has localhost. localdomain account information. We can just delete it, or authorize the IP address again. The deletion method is as follows:
The Code is as follows: |
Copy code |
Mysql> use mysql; Mysql> delete from user where HOST = 'localhost. localdomain '; Query OK, 2 rows affected (0.00 sec) |
Restart MYSQL and find that the warning is no longer available. Some friends may ask what to do if skip-name-resolve is enabled due to such a problem. You will know this in the future.