Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Feb 122011
 

Solving the error "Packet too large" in MySQL

Answer:

When you try to insert a very large row of data (e.g. BLOB) into MySQL using a single insert statement, MySQL might give you the error "Packet too large". You might need to adjust the value of max_allowed_packet as needed.

1. Edit the MySQL configurations, e.g. /etc/my.cnf

..
max_allowed_packet=32M
..

Don't forget to restart MySQL to take effect.

# /sbin/service mysqld restart

Reference: http://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>