错误mysql:有一个大于'max_allowed_pa​​cket'字节的数据包[重复]

时间:2022-05-11 22:55:39

This question already has an answer here:

这个问题在这里已有答案:

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 .

请给我一个解决它的最佳解决方案?坦克斯。

1 个解决方案

#1


12  

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_pa​​cket = 16M更改为:max_allowed_pa​​cket = 128M

or add --max_allowed_packet=128M to your mysqldump command.

或者将--max_allowed_pa​​cket = 128M添加到mysqldump命令中。

mysql --max_allowed_packet=128M -u user -ppass database < database.sql 

#1


12  

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_pa​​cket = 16M更改为:max_allowed_pa​​cket = 128M

or add --max_allowed_packet=128M to your mysqldump command.

或者将--max_allowed_pa​​cket = 128M添加到mysqldump命令中。

mysql --max_allowed_packet=128M -u user -ppass database < database.sql