Friday, August 23, 2013

Today I was importing a
MySQL database and ran into this Error “Error 1153 - Got a packet bigger than
'max_allowed_packet' bytes”.

Basically , When
you dump table data from MySQL, you may end up pulling a large chunk of data
and it may exceed the MySQL client’s max_allowed_packet variable. If that happens,
you might catch an error like this:

The default max_allowed_packet size is 25M, and you can adjust it for
good within your my.cnf by setting the variable in a section for mysqldump:

OR

The fix is to increase the MySQL daemon’s max_allowed_packet. You can do
this to a running daemon by logging in as Super and running the following
commands. Keeping the session open create a 2nd session in which to run the
import.