[thelist] MySQL - Got a packet bigger than 'max_allowed_packet' bytes

Bob Meetin bobm at dottedi.biz
Fri Mar 19 18:46:14 CDT 2010

I am moving a database to a new webhost, created a very large dump.sql 
file (had to use the GUI PHPMyAdmin), but am having trouble restoring it 
at the new location.  Am using a restore query like this via shell prompt:

% mysql -u$username -p$password $database < dump.sql

This results in: ERROR 1153 (08S01) at line 72: Got a packet bigger than 
'max_allowed_packet' bytes

The dump.sql file is a tad over 31MB in size.

I googled the error and found where it says to increase by:

set global net_buffer_length=1000000;
set global max_allowed_packet=1000000000;

Of course no access:

mysql> set global max_allowed_packet=1000000000;
ERROR 1227 (42000): Access denied; you need the SUPER privilege for this 

I also found a suggestion like:

% mysql --max_allowed_packet=32M -u $user -p $password $database < dump.sql
% mysql --max_allowed_packet=64M -u $user -p $password $database < dump.sql

Same result max allowed packet error. Where do I go from here?

thx, Bob

More information about the thelist mailing list