Got a packet bigger than 'max_allowed_packet' bytes,cpp mysql insert multiple values and exceed maximum capacity

 

You can also log into MySQL console and run the following command to set max_allowed_packet size for the duration of the session.

set global net_buffer_length=1000000; 
set global max_allowed_packet=1000000000;

When finished above commands,exit and restart mysql then login again.

    show variables like 'max_allowed_packet';



 

set global net_buffer_length=1000000;set global max_allowed_packet=1000000000;show variables like 'max_allowed_packet';

exit and login again

 

posted @ 2022-12-04 16:45  FredGrit  阅读(26)  评论(0编辑  收藏  举报