Re: ERROR 1153: Got a packet bigger than 'max_allowed_packet' bytes
Posted by: David Sanchez
Date: May 07, 2009 02:38PM

I figured I'd help everyone out here who is having this problem...

I have been hassled by this error for a couple days and I finally ran across some information in the online documentation that helped me clear this up.

This was taken from http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html:
"Both the client and the server have their own max_allowed_packet variable, so if you want to handle big packets, you must increase this variable both in the client and in the server."

I checked my server's max_allowed_packet value by doing a "SHOW VARIABLES" and it was set to 1M. I was originally misled by using "SELECT @@MAX_ALLOWED_PACKET" from within the mysql client. However, it appears that is a CLIENT-SIDE variable and does not show the value of the server-side variable (of the same name).

So, I added the following lines to my.cnf and restarted the server:
[mysqld]
max_allowed_packet=16M


I verified the variable value by running another "SHOW VARIABLES" and it accepted my changes.
Now I imported my table dump into a new database and everything worked great!

I hope this helps everyone else who is frustrated by this issue.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.