MySQL error 1153 in max_allowed_packet

Oggi mi sono trovato di fronte ad un errore anomalo durante un import di un database su mysql:

ERROR 1153 (08S01) at line 3854: Got a packet bigger than 'max_allowed_packet' bytes

Per risolverlo e' sufficiente editare il file di configurazione di mysql (/etc/my.cnf su Linux) ed impostare ad un valore sufficientemente alto il parametro max_allowed_packet. Nel mio caso ho inserito 100M. Riavviate il demone mysqld e l'import andra' adesso a buon fine!