Linux Sysadmin Blog

Mysql Error 1153: Got a Packet Bigger Than 'Max_allowed_packet' Bytes

- | Comments

I got this error while importing large database dump from command line.

1
ERROR 1153 (08S01) at line XXX: Got a packet bigger than 'max_allowed_packet' bytes

I searched and found out that it is related to the default max_allowed_packet which is 16M, so i need to increase this setting from Mysql:

1.) Change setting on my.cnf and restart mysql:

1
2
set-variable = max_allowed_packet=32M
/etc/init.d/mysql restart

Or;

2.) Change setting temporarily. Login to MySQL and issue:

1
SET GLOBAL max_allowed_packet=1000000000;

Note: You may want to restart your Mysql to reload your previous/default settings.

Comments