Home > Database > Mysql Tutorial > MySQL:reading initial communication packet问题解决方法之一

MySQL:reading initial communication packet问题解决方法之一

WBOY
Release: 2016-06-07 18:07:39
Original
1607 people have browsed it

网站访问出现如题错误,经过检查my.cnf,发现innodb_buffer_pool_size = 2048M 设置过大,调整为innodb_buffer_pool_size = 1024M即可,网上也有该问题的其他解决方法,但都不能解决我的问题

解决方法之一:

网站访问出现如题错误,经过检查my.cnf,发现innodb_buffer_pool_size = 2048M 设置过大,调整为innodb_buffer_pool_size = 1024M即可,网上也有该问题的其他解决方法,但都不能解决我的问题。

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
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template