Home  >  Article  >  Database  >  数据库还原提示MySQL server has gone away 的解决方法

数据库还原提示MySQL server has gone away 的解决方法

WBOY
WBOYOriginal
2016-06-07 16:53:021251browse

使用mysql做数据库还原的时候,由于有些数据很大,会出现这样的错误:The MySQL Server returned this Error:MySQL Error Nr. My

使用mysql做数据库还原的时候,,由于有些数据很大,会出现这样的错误:The MySQL Server returned this Error:MySQL Error Nr. MySQL server has gone away。我的一个30mb的备份还原的时候就出现了这错误。

解决的方法就是找到mysql安装目录,找到my.ini文件,在文件的最后添加: max_allowed_packet = 32M(也可以设置自己需要的大小)。 max_allowed_packet 参数的作用是,用来控制其通信缓冲区的最大长度。 

linux

Statement:
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