You are here

Warning user entry ignored in MySQL error log

Hello all,

I am getting some MySQL warnings in the error log during the start-up:

[Warning] 'user' entry 'root@master' ignored in --skip-name-resolve mode.
[Warning] 'proxies_priv' entry '@ root@laptop4' ignored in --skip-name-resolve mode.

Please suggest how can I prevent such warnings in the MySQL error log?

Taxonomy upgrade extras: 

Hello oli,

it looks like you have enabled skip_name_resolve in your my.cnf.
This prevents MySQL to do (DNS) host lookups. If you have created some users with explicit host names MySQL wants to tell you now that you cannot use these users any more with this configuration. Example:

mysql> GRANT ALL ON *.* TO 'root'@'master';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> SHOW WARNINGS;
+---------+------+--------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                      |
+---------+------+--------------------------------------------------------------------------------------------------------------+
| Warning | 1285 | MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work |
+---------+------+--------------------------------------------------------------------------------------------------------------+

You can find if skip_name_resolve is enabled by the following command:

mysql> SHOW GLOBAL VARIABLES LIKE 'skip_name_resolve';
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| skip_name_resolve | ON    |
+-------------------+-------+

You can find the conflicting users with the following query:

mysql> SELECT user, host FROM mysql.user WHERE host NOT IN ('%', '127.0.0.1', '::1', 'localhost');
+----------+--------------+
| user     | host         |
+----------+--------------+
| mocenter | 192.168.56.% |
| root     | master       |
+----------+--------------+

only the second one does a host name lookup and thus cannot be used any more. The best is to delete this user or change the host name to an IP address:

mysql> UPDATE mysql.user SET host = '192.168.1.42' WHERE host = 'master';
mysql> FLUSH PRIVILEGES;

Now to the second part of your warning: This is possibly a remaining of the mysql_secure_installation script which still is or was buggy:

mysql> SELECT user, host FROM mysql.proxies_priv;
+------+-----------+
| user | host      |
+------+-----------+
| root | laptop4   |
| root | localhost |
+------+-----------+

The proxies privileges should have been cleaned-up as well but because of the bug it is not. Just delete the record manually:

mysql> DELETE FROM mysql.proxies_priv WHERE host = 'laptop4';
mysql> FLUSH PRIVILEGES;

Shinguzcomment