mysql 错误:数据包大于“max_allowed_packet”字节
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13218975/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
error mysql : Got a packet bigger than 'max_allowed_packet' bytes
提问by superuser
for import mysql database give me this error :
对于导入 mysql 数据库给我这个错误:
$ `mysql -u user -p password zxc_db < zxc.sql`
ERROR 1153 (08S01) at line 96: Got a packet bigger than 'max_allowed_packet' bytes
Please give me a best solution to solve it ? tanx .
请给我一个最好的解决方案来解决它?坦克斯。
回答by yal110
the best solution is " change mysql.cnf "
debian :
/etc/mysql/mysql.cnf
change this line ==> max_allowed_packet = 16M
to : max_allowed_packet = 128M
最好的解决方案是“更改 mysql.cnf” debian:/etc/mysql/mysql.cnf 将此行 ==> 更改max_allowed_packet = 16M
为:max_allowed_packet = 128M
or add --max_allowed_packet=128M to your mysqldump command.
或将 --max_allowed_packet=128M 添加到您的 mysqldump 命令。
mysql --max_allowed_packet=128M -u user -ppass database < database.sql