[MySQL]IP address '192.168.31.110' could not be resolved: Temporary failure in name resolution

查看MySQL数据库日志,发现大量Warning:

2014-07-29 16:53:34 18928 [Note] /home/mysql/mysql/bin/mysqld: ready for connections.
Version: '5.6.12'  socket: '/home/mysql/mysql/mysql.sock'  port: 23306  MySQL Community Server (GPL)
2014-07-29 17:00:29 18928 [Warning] IP address '192.168.31.110' could not be resolved: Temporary failure in name resolution
2014-07-29 17:00:31 18928 [Warning] IP address '192.168.31.110' could not be resolved: Temporary failure in name resolution
2014-07-29 17:06:22 18928 [Warning] IP address '192.168.31.110' could not be resolved: Temporary failure in name resolution

192.168.31.110是我本机的IP地址,也就是说服务器上的MySQL无法将192.168.31.110这个IP地址解析为主机名

在服务器的/etc/hosts文件中添加上本机的地址信息(需root权限):

192.168.31.110 ThinkPad

然后重启MySQL服务,使用本地客户端连接至MySQL后再次观察日志文件,这次没有Warning信息了

还有一种去掉Warning信息的方式是在启动时附带参数,忽略主机名解析:

[mysql@fedora1 ~]$ mysql.server start --skip-name-resolve

 

你可能感兴趣的:(mysql)