Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to Increase max_allowed_packets in MySQL
While uploading some large images into Liferay's document library, I received the following error:
ERROR [JDBCExceptionReporter] Packet for query is too large (6146352 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
To get around this, you need to increase MySQL's max_allowed_packet variable. Edit the .ini or .cnf (depends on the setup you have) file that is read by mySQL.
Add in the line
max_allowed_packet=32MB
under the value of
[mysqld]
save the file
shut down the mySQL server
then start the mySQL server
login to mysql and type
mysql> show variables like 'max_allowed_packet';
you should get something like:
+--------------------+---------+
¦ Variable_name ¦ Value ¦
+--------------------+---------+
¦ max_allowed_packet ¦ 33553408 ¦
+--------------------+---------+
ERROR [JDBCExceptionReporter] Packet for query is too large (6146352 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
To get around this, you need to increase MySQL's max_allowed_packet variable. Edit the .ini or .cnf (depends on the setup you have) file that is read by mySQL.
Add in the line
max_allowed_packet=32MB
under the value of
[mysqld]
save the file
shut down the mySQL server
then start the mySQL server
login to mysql and type
mysql> show variables like 'max_allowed_packet';
you should get something like:
+--------------------+---------+
¦ Variable_name ¦ Value ¦
+--------------------+---------+
¦ max_allowed_packet ¦ 33553408 ¦
+--------------------+---------+