MySQL: Error 1153 – Got a packet bigger than ‘max_allowed_packet’ bytes

Error 1153 – Got a packet bigger than ‘max_allowed_packet’ bytes. The solution of this error is to change the value of max_allowed_packet’.

Generally, max_allowed_packet is initialized to net_buffer_length bytes and when we are dealing with large BLOB columns or any long strings like a big database dump or restore, we should also increase the size of max_allowed_packet.

The default value is very small and it requires to change for large packets.

When we are changing the value of max_allowed_packet, we should also change the buffer size on the client side.

Method 1: Under the mysqld section, add or change the value in my.cnf file:

Method 2: Directly run these commands in the MySQL console:

Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz