When optimizing MySQL configuration, add skip-name-resolve to check the startup log when you restart MySQL. Warning Information is found.
120726 11:57:22 [Warning] 'user' entry 'root @ localhost. localdomain 'ignored in -- skip-name-resolve mode.
120726 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, the host name cannot be used in the mysql authorization table, and only IP addresses are allowed. This warning is displayed because the mysql table already has localhost. localdomain account information.
Let's just delete it.
Mysql> use mysql;
Mysql> delete from user where HOST = 'localhost. localdomain ';
Query OK, 2 rows affected (0.00 sec)
Restart MYSQL and the warning is no longer displayed.