Skip to main content

MySQL Error: [Warning] user entry root @



After installing the mysql server, the following error appears in the daemon.log log:

 Jul 24 15:29:08 srv mysqld: 140724 15:29:08 [Warning] 'user' entry 'root@example.com' ignored in --skip-name-resolve mode.
 Jul 24 15:29:08 srv mysqld: 140724 15:29:08 [Warning] 'proxies_priv' entry '@ root@example.com' ignored in --skip-name-resolve mode.



All the fault of the disabled DNS resolution: determining the domain name for the ip-addresses of clients connected to the mysql server. I don’t need this function on the server, therefore I’m disabled by the skip-name-resolve parameter in the my.cnf file.

Corrects the error in this way. Connect to the mysql server and select the mysql database.

  mysql> use mysql; 

Then select the user table.


  mysql> select Host, User from user; 

A result is displayed, in which users and hosts will be visible, for which the authorization of these users is available.

 + --------------------- + ------------------ +
 |  Host |  User |
 + --------------------- + ------------------ +
 |  127.0.0.1 |  root |
 |  :: 1 |  root |
 |  example.com |  root |
 + --------------------- + ------------------ +
 13 rows in set (0.00 sec)

Then we select the following table - proxies_priv.

  mysql> select Host, User from proxies_priv; 

Its contents will be something like this:


  + --------------------- + ------ +
 |  Host |  User |
 + --------------------- + ------ +
 |  localhost |  root |
 |  example.com |  root |
 + --------------------- + ------ +
 2 rows in set (0.00 sec)

As you can see, there is an “extra” root with access for the example.com domain. It can also be just the host name, for example, root @ example. It is this user that causes the error. Delete it:

  mysql> deluser 'root'@'example.com'; 

To top it off, we are updating privileges.

  mysql> flush privileges; 

I repeat that this method is only suitable if you do not need external connections to the mysql server as root. In other cases, you should include resolving DNS.



How do you rate the article?
Звёзд: 1Звёзд: 2Звёзд: 3Звёзд: 4Звёзд: 5 (No ratings yet)
Loading...

Add a comment

Your email will not be published.