Home > Database > Mysql Tutorial > body text

如何修改mysql数据库的max_allowed_packet参数

WBOY
Release: 2016-06-07 16:17:06
Original
1671 people have browsed it

如在导入数据库时出现Got a packet bigger than 'max_allowed_packet' bytes或者MySQL server has gone away等错误,一般是由于当前导入的数据大于系统的限制的最大包大

如在导入数据库时出现“Got a packet bigger than 'max_allowed_packet' bytes”或者“MySQL server has gone away”等错误,一般是由于当前导入的数据大于系统的限制的最大包大小。服务器的默认max_allowed_packet值为1MB,,通过修改 'max_allowed_packet' 参数的大小就可以解决问题。

修改方法为:进入mysql的安装目录,找到my.ini文件,在最底下加上 max_allowed_packet=*M (自己视情况设置)即可。

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