7

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 .

superuser
  • 519
  • 2
  • 5
  • 13
  • 5
    Do you mean other than `"increase max_allowed_packet in my.cnf"`? – Burhan Khalid Nov 04 '12 at 13:35
  • Another thread answered this question: http://stackoverflow.com/questions/93128/mysql-error-1153-got-a-packet-bigger-than-max-allowed-packet-bytes Basically, you need to change the settings both on the dameon and on the client. – mprat Sep 12 '13 at 17:01

1 Answers1

13

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 
yal110
  • 154
  • 1
  • 3