I have a MYSQL dump from a database that I am trying to move to a new db server. When I try to import my sql dump, I receive the following error:
MySQL Error
Adding this answer for the benefit of future searchers, as it explains why increasing the packet size fixed the problem:
The situation is that if a client sends a SQL-statement longer than the server max_allowed_packet setting, the server will simply disconnect the client. Next query from the same client instance will find that the ‘MySQL server has gone away’.
... But it would of course be much preferable to have the ‘got packet bigger’ error [Error: 2020 (CR_NET_PACKET_TOO_LARGE)] returned if that is the problem.
Excerpted from and thanks for peter_laursen's blog post
On OSX 10.7 (Lion), I created a file, /etc/my.cnf with the following contents:
[mysqld]
max_allowed_packet = 12000000
And then stopped the mysql server:
/usr/local/bin/mysql.server stop
When it automatically restarted I was able to execute my inserts.