Magento News

 

Got a packet bigger than ‘max_allowed_packet’ bytes – MySql – Part 2

This error appears when you are running a database import.

To fix this:
A:
1) If you can; open as administrator the my.cnf file under the mysqld or etc folder.
2) Locate the entry max_allowed_packet and set this to a bigger number as you wish. It should be around 1M by default.

B:
You can also, use mysql console to update the values as

set global net_buffer_length=[SOME_BIG_NUMBER];
set global max_allowed_packet=[SOME_BIG_NUMBER];

C:
You could also get away with only the following command. however in my case it seemed to work well with a combination of step A.

mysql --max_allowed_packet=[SOME_NUMBER]M -uroot -p [dbname] < dump.sql

Got a packet bigger than ‘max_allowed_packet’ bytes – MySql – Part 2

Possibly Related Posts:


 

Leave a Reply