MySQL enabled Skip-name-resolve mode when the warning approach, currently if your authorization is for all hosts you will not encounter the problem
When optimizing MySQL configuration, join skip-name-resolve, check boot log when restarting MySQL, and find warning message.
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 prevent network DNS resolution services from raising errors that access MySQL, which should generally be enabled. When enabled, in the MySQL authorization table can not use the host name, can only use IP, this is the warning because the MySQL table already has Localhost.localdomain account information. Let's just delete it, or authorize a new IP address. 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, found that the warning has not been, then some friends will ask since this is a problem that enable skip-name-resolve what to do, this estimate you will know later OH.