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 minimal, and it requires to change for large packets.
When we are changing the value of max_allowed_packet, we should also modify the buffer size on the client side.
When we are changing the value of max_allowed_packet, we should also modify the buffer size on the client side.
Method 1: Under the mysqld section, add or change the value in my.cnf file:
1
2
3
|
[mysqld]
max_allowed_packet=128M
|
Method 2: Directly run these commands in the MySQL console:
1
2
|
set global net_buffer_length=1000000;
set global max_allowed_packet=1000000000;
|
0 comments:
Post a Comment