Lost connection to MySQL server at 'reading initial communication packet' 错误解决

上次解决了这个问题,今天又碰到,突然失忆,又做了一番无用功后终于搞定,这次一定要记录下来,免得下次又浪费时间

1、修改mysql配置文件

vi /etc/my.cnf

[mysqld]段加skip-name-resolve

在这个之前要把mysql的远程访问权限打开,或者再加skip-grant-table(不推荐)

2、修改hosts.allow

vi /etc/hosts.allow

加mysqld : ALL : ALLOW

mysqld-max : ALL :ALLOW

相关文章:

  • 2021-08-10
  • 2021-10-06
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-07-28
猜你喜欢
  • 2022-02-03
  • 2021-07-05
  • 2021-07-26
  • 2022-12-23
  • 2021-10-04
  • 2021-09-07
  • 2022-12-23
相关资源
相似解决方案