For the client:
mysql --max_allowed_packet=100M -u root -p db < dump.sql
For permanent fix - change the my.cnf
[mysqld]
max_allowed_packet=100M
and restart the serverset global net_buffer_length=1000000;
set global max_allowed_packet=1000000000;
Get the current status:
SHOW VARIABLES LIKE 'max_allowed_packet';