Home > MySQL > mysqldump: Got packet bigger than ‘max_allowed_packet’ bytes

mysqldump: Got packet bigger than ‘max_allowed_packet’ bytes

If you get this error then you need to change the max_allowed_packet size in my.cnf  in the [mysqldump] section

max_allowed_packet = 500M

The maximum size as of Mysql 5.1 is 1024 MB


This works fine if you are on the localhost and are using mysqldump from the local host

However, if you are trying to do a remote connection to a remote host, then you will need to change the size of both the client and server max_allowed_packet sizes

For example

  1. Mysql Server A is on Host H
  2. You have set max_allowed_packet size = 1G for Mysql Server A on Host H
  3. Now you want to connect to Host H from Host Y and take backup of Mysql Server A
  4. Then you will need to set max_allowed_packet size = 1G in Host Y my.cnf configuration file as well

max_allowed_packet size is used both to send and receive chunks of data


Categories: MySQL
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: