Sunday, August 14, 2011

MySQL:Got a packet bigger than 'max_allowed_packet' bytes

This is generally the case when u try to import a database from a dump. The fix is to increase the max_allowed_packet size follow the below steps

  1. vi /etc/my.cnf
  2. add: max_allowed_packet=1G under the section [mysqld] and save the file
  3. restart the mysql: /etc/init.d/mysqld restart;
  4. it should be smooth, if at all u get a warning telling it will ignore the cnf file, then try
    1. chmod 655 /etc/my.cnf and again try to restart.

This should do.

No comments:

Post a Comment