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:

Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from

Leave a Reply

Be the First to Comment!

Notify of