skip-name-resolve=ON harmful?

Hello,

I received a recommendation from mysqltuner.pl suggesting that setting “skip-name-resolve=ON” in the MariaDB configuration could improve performance by preventing name resolution for each query.

Is there any downside to adding this to my config file? I believe it should be fine, but I wanted to check with you all first.

Thank you!

Hi @TheTruckerAL

When you enable skip-name-resolve, the server stops doing DNS lookups for client hostnames, that means that users can only use localhost or IPs. If you don’t allow remote connections to your DB that shouldn’t be any problem.

Anyway, you can check it with the following command. If there’s no output, then everything is fine and you can safely enable the directive:

mariadb -uroot -e "SELECT user, host FROM mysql.user WHERE host NOT IN ('localhost', '127.0.0.1', '%');"

The logs will show the client’s IP instead of the hostname, but that shouldn’t be a problem.

1 Like

Thank you. I do not have any remote connections, all local.
and the output did not return anything as well.

Thanks again!

1 Like