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
source share