错误信息:

2020-04-17 08:43:28,810 [http-nio-443-exec-8] ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] - 
Packet for query is too large (1673 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.

当查询数据比较大的时候在网络中传输,超过默认值就会报以上错误

解决方法,找到mysql配置文件.my.ini,在[mysqld]下面添加以下配置

max_allowed_packet = 100M

query_cache_limit = 40M

修改好以后重启mysql服务

 

转载自:https://blog.csdn.net/xiaoping0915/article/details/64587042

posted on 2020-04-18 19:34  你不知道的浪漫  阅读(243)  评论(0编辑  收藏  举报