Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 16:53:02
Original
1260 people have browsed it

使用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

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!