Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error mysql : Got a packet bigger than 'max_allowed_packet' bytes [duplicate]

for import mysql database give me this error :

$ `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 .

like image 728
superuser Avatar asked Nov 04 '12 13:11

superuser


1 Answers

the best solution is " change mysql.cnf " debian : /etc/mysql/mysql.cnf change this line ==> max_allowed_packet = 16M to : max_allowed_packet = 128M

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

mysql --max_allowed_packet=128M -u user -ppass database < database.sql 
like image 112
yal110 Avatar answered Nov 11 '22 03:11

yal110