MySQLmysqldump: 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

[mysqldump]
max_allowed_packet = 500M

The maximum size as of Mysql 5.1 is 1024 MB

http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet

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

Comments

No Comments Yet. Be the first?

Post a comment

Your email address will not be published. Required fields are marked *