报错信息:
Error updating database. Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (5872 > 1024). You can change this value on the server by setting the max_allowed_packet‘ variable.
解决办法:
进入MYSQL
输入show variables like ‘%max_allowed_packet%‘;
2.修改配置,我这里设置的是20M
在MYSQL里输入set global max_allowed_packet = 2*1024*1024*10;(20M)
原文地址:
https://blog.csdn.net/qq_33864656/article/details/75006841
注意:Tomcat要重启,mysql不用重启
show variables like ‘%max_allowed_packet%‘;
set global max_allowed_packet = 1048576;
修改之后要关闭连接,重新连接mysql,要不然看不到效果
原文地址:https://www.cnblogs.com/zhouheblog/p/9549524.html
时间: 2024-11-16 07:18:50