mysql skip-name-resolve not stopping dns lookups

Recently our Rackspace DNS servers were experiencing major lag which had a stalling effect on our mysql database servers. This was confusing since I had disabled DNS lookups months ago by adding skip_name_resolve = ON in my.cnf and restarting the mysql server.

After doing some research I found this article, which confirmed I had already taken the necessary steps to prevent this from happening:…d-name-server/

However when doing a strace on the mysql process and attempting to connect to it the following output confirmed it was still accessing the Rackspace DNS server, which was exactly where the process was stalling:

connect(209, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr(“”)}, 16) = 0

The temporary solution that fixed the stalling of mysql was to add googles dns server to the top of the list in /etc/resolve.conf like this:


I’ve searched and have not found any instances of the skip_name_resolve configuration not working. I could use some help in truly disabling DNS lookups for mysql.

Here are my specs for one of the database servers:

  • OS version: Ubuntu 14.04.1 LTS
  • MySQL version: 5.6.23-72.1-log Percona Server
  • my.cnf setting: skip_name_resolve = ON
  • show variables output: skip_name_resolve | ON

Hi, it looks like Rackspace limits DNS queries (rate limits) - instaling nscd solved this issue for one of our customers.