Note that this blog post has been archived. Information may be out of date or incorrect.

ERROR 2006 (HY000) at line

One of those very helpful error messages. I got this error when importing a large database, and it was caused by some insert statements exceeding the configured max_allowed_packet size (manual). According to this bug entry, the error message should actually say

Got a packet bigger than 'max_allowed_packet' bytes

but that doesn’t seem to fixed to this day. To fix the error, simply increase max_allowed_packet in your my.cnf file, under the [mysqld] section, e.g.

max_allowed_packet = 16M