Like many people, I run mysql with skip-name-resolve (docs), and only ever use IP addresses to connect to avoid DNS issues and overhead. When installing, mysql_install_db accepts a --skip-name-resolve switch (docs), so with those two set you would expect it to not create name-based users, but this is not the case. With both of those set, there are two name-based users created and so I get this in my logs on startup:

140309 18:47:16 [Warning] 'user' entry 'root@hostname.localdomain' ignored in --skip-name-resolve mode.
140309 18:47:16 [Warning] 'user' entry '@hostname.localdomain' ignored in --skip-name-resolve mode.

How do I stop it from creating these users in the first place?

I'm running MySQL 5.1.70 on OpenBSD 5.4 (current release package).

  • What value does /usr/local/mysql/bin/resolveip `hostname` | awk '/ /{print $6}' return when run on your system? – Michael - sqlbot Mar 11 '14 at 20:50
  • hostname comes back with hostname.localdomain, but resolveip says "Unable to find hostid for 'hostname.localdomain': host not found". I guess it could do with a line in the hosts file to let that resolve, but I don't see why it's even looking up the name in the first place. – Synchro Mar 15 '14 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.