- Just in case, to check variables you can use
$> mysqladmin variables -u user -p
This will display the current variables, in this case max_allowed_packet, and as someone said in another answer you can set it temporarily with
$> mysql -u user -p
mysql> SET GLOBAL max_allowed_packet=1072731894
- Adding this line into my.cnf file solves my problem.
max_allowed_packet=64M