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:
http://codeinthehole.com/writing/sol…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(“173.203.4.9”)}, 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:

nameserver 8.8.8.8

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.

1 Like

I am not sure, but it looks like I am having a related issue. I tried

[mysql]
skip_name_resolve = on

and

[mysql]
skip-name-resolve = on

and I am still get Windows Event Log Warnings that read:

IP address ‘34.65.113.188’ has been resolved to the host name ‘188.113.65.34.bc.googleusercontent.com’, which resembles IPv4-address itself.

and also:

IP address ‘167.99.101.152’ could not be resolved: No such host is known.

I do not understand these entries, because my applications are all locally based.

  • OS: Windows 10 Pro
  • DNS: simpleDNS Pro
  • MariaDB version 10.6.5.0
  • MariaDB ODBC Unicode Driver 3.1.15.0

Is this related? (I am sorry if I am stepping in on the wrong place. The is my first post.)

1 Like

Hi, the skip_name_resolved has to go under [mysqld] section of my.cnf

2 Likes