mysql could not be resolved: Name or service not known

Posted 追忆丶年华

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql could not be resolved: Name or service not known相关的知识,希望对你有一定的参考价值。

问题: 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的主要内容,如果未能解决你的问题,请参考以下文章

The following artifacts could not be resolved(jenkins打包报错)

Eclipse CDT “Symbol NULL could not be resolved”

Python 完美解决 Import “模块“ could not be resolved ...

即使构建成功,Eclipse c++ Type could not be resolved 错误

NIOS II ecliplse中出现Symbol 'XX_BASE' COULD NOT BE RESOLVED解决

问题解决:Import “requests“ could not be resolved from sourcePylancereportMissingModuleSource)