Mysql Hibernate报错

错误信息:

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

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

Mysql Hibernate报错

上一篇:sql语句执行顺序


下一篇:MySQL 字符串函数substring、字符串截取substring_index