码迷,mamicode.com
首页 > 数据库 > 详细

mysql could not be resolved: Name or service not known

时间:2018-01-21 16:17:46      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:log   war   user   解析   ted   就是   list   错误   ica   

问题: mysql DNS反解:skip-name-resolve

错误日志有类似警告:


1.120119 16:26:04 [Warning] IP address ‘192.168.1.10‘ could not be resolved: Name or service not known
2.120119 16:26:04 [Warning] IP address ‘192.168.1.14‘ could not be resolved: Name or service not known
3.120119 16:26:04 [Warning] IP address ‘192.168.1.17‘ could not be resolved: Name or service not known

通过show processlist发现大量类似如下的连接:

1.|592|unauthenticated user|192.168.1.10:35320|NULL|Connect| |login|NULL|
2.|593|unauthenticated user|192.168.1.14:35321|NULL|Connect| |login|NULL|
3.|594|unauthenticated user|192.168.1.17:35322|NULL|Connect| |login|NULL|

skip-name-resolve 参数的作用:不再进行反解析(ip不反解成域名),这样可以加快数据库的反应时间。

修改配置文件添加并需要重启:

 

复制代码代码如下:

[mysqld] 
skip-name-resolve

 

其实就是在[mysqld]下面一行加入skip-name-resolve重启mysql服务就可以了。

mysql could not be resolved: Name or service not known

标签:log   war   user   解析   ted   就是   list   错误   ica   

原文地址:https://www.cnblogs.com/xiaoleiel/p/8324110.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!