Home  >  Article  >  Database  >  如何修改mysql数据库的max_allowed_packet参数

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

WBOY
WBOYOriginal
2016-06-07 16:17:061669browse

如在导入数据库时出现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 (自己视情况设置)即可。

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