在工作中出现这样的问题,研发和测试同事在连接mysql的时候,突然mysql连接断开,每天都会出现1-2次
错误日志内容
2014-04-08 17:58:11 24636 [Warning] IP address '192.168.1.116' could not be resolved: Name or service not known
2014-04-08 17:58:24 24636 [Warning] IP address '192.168.1.109' could not be resolved: Name or service not known
2014-04-08 18:00:26 24636 [Warning] IP address '192.168.1.46' could not be resolved: Name or service not known
2014-04-08 18:00:41 24636 [Warning] IP address '192.168.1.103' could not be resolved: Name or service not known
2014-04-09 10:03:00 24636 [Warning] IP address '192.168.1.102' could not be resolved: Name or service not known
2014-04-09 10:04:20 24636 [Warning] IP address '192.168.1.115' could not be resolved: Name or service not known
这个错误日志表示mysql对ip地址进行dns解析,解决的办法就是修改my.cnf配置文件取消dns解析
skip-name-resolve
其他相关