美文网首页
解决Got timeout reading communicat

解决Got timeout reading communicat

作者: 三叉戟渔民 | 来源:发表于2020-09-14 16:53 被阅读0次

场景

mysql日志总是报Got timeout reading communication packets提示

解决

禁用skip-name-resolve

[root@test ~]# vim /etc/my.cnf
[mysqld]
skip-name-resolve

注:此语句用于跳过dns域名解析,在局域网连接时会更快捷,不过使用此命令,mysql库的user表中的host须由原来localhost改为%,否则不能连接数据库。

另一种方法把client的ip写在/etc/hosts里面,随便加个名称就行
比如:
192.168.1.111 test_name

相关文章

网友评论

      本文标题:解决Got timeout reading communicat

      本文链接:https://www.haomeiwen.com/subject/kfvzektx.html