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:
set global net_buffer_length=1000000;
set global max_allowed_packet=1000000000;
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 dbrnd.com, 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.