background image
HomeRecent PostsDrupalSearchTagsRSSContactAboutAccount

user warning: Got a packet bigger than 'max_allowed_packet' bytes

Eric.London's picture

I just the following error when loading a large cck node form:

user warning: Got a packet bigger than 'max_allowed_packet' bytes

You can resolve this error by adding a line to your /etc/my.cnf MySQL configuration:
[mysqld]
set-variable = max_allowed_packet=32M

Eric.London's picture

MAMP

And if you are using MAMP, you can copy this file..

/Applications/MAMP/Library/share/mysql/my-small.cnf

to this folder..

/Applications/MAMP/db/mysql/

rename it to "my.cnf", make your changes, and restart your MySQL service.

Eric.London's picture

setting variables without restarting MySQL

You can also change this variable without restarting MySQL.

root@server [/etc]# mysql --execute="show variables" | grep -ir max_allowed_packet
max_allowed_packet 16777216

root@server [/etc]# mysql --execute="set global max_allowed_packet=33554432"

root@server [/etc]# mysql --execute="show variables" | grep -ir max_allowed_packet
max_allowed_packet 33554432

(thanks Mike!)