MySQL – Service Shutdown

MySQLshutdown

The mysql service was stopped and in mysql log I saw these warning:

161125 16:41:10 [Warning] IP address 'x.x.x.x' has been resolved to the host name 'x.x.x.x.xxx.xxxxxx.com', which resembles IPv4-address itself.
161125 23:58:23 [Note] /usr/sbin/mysqld: Normal shutdown

Notice:

  • with iptable, only the server address is accepted for port 3306

  • In my.cnf I set the bind_address = server_adress_ip: bind_address = x.x.x.x

Why the mysql service was stopped?

Best Answer

It's a WARNING and a NOTICE, not an ERROR. Neither of them are responsible for the shutdown. I assume however you're getting this message because in your /etc/hostname (or dns) you have a polluted entry.

As for why mysql cares what the name resolves to, here is a post on the mailing list.

This warning seems to come from MySQL ACL code. The reason is that reverse DNS lookup returns hostname which resembles IPv4 address (hostname starts with '98.158.'). One way to get rid of this warning and DNS lookups is to put

skip-name-resolve

in my.cnf. However, in this case you can use only IP addresses in MySQL grant tables. For more information see http://dev.mysql.com/doc/refman/5.5/en/dns.html.

If this is by intent, you may want to read this bug