Packet for query is too large (5,145 > 1,024). You can change this value on the server by setting the 'max_allowed_packet' variable.
错误
在使用Mybatis generator时提示MySQL写入过大
Packet for query is too large (5,145 > 1,024). You can change this value on the server by setting the 'max_allowed_packet' variable.

环境
MySQL 8.0.11
Mybatis generator 1.3.7
查询
SHOW VARIABLES LIKE '%max_allowed_packet%'

修改my.cnf
在my.cnf中添加
max_allowed_packet=10M

重启mysql


这样就可以了。
Packet for query is too large (5,145 > 1,024). You can change this value on the server by setting the 'max_allowed_packet' variable.的更多相关文章
- MySQL5中大数据错误:Packet for query is too large (****** > ******). You can change this value on the server by setting the max_allowed_packet' variable.;
使用的MySQL数据库版本:5.5 插入或更新字段有大数据时(大于1M),会出现如下错误: ### Cause: com.mysql.jdbc.PacketTooBigException: Packe ...
- 服务器的日志一直报Packet for query is too large (7632997 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.的解决方法
服务器的日志一直报Packet for query is too large (7632997 > 4194304). You can change this value on the serv ...
- 问题: Packet for query is too large (1786 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
错误描述: 今天在手机端查看之前上线的项目时,突然报了下面的错误.再之后用电脑登陆,其他设备登陆都一直报这个错误. 错误信息: ### Error querying database. Cause: ...
- MYSQL Packet for query is too large (12054240 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
MYSQL Packet for query is too large (12054240 > 4194304). You can change this value on the server ...
- Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16944839 > 16777216). You can change this value on the server by setting the max_allowed_packet' variable.
今天发现task微服务的error日志报如下错误: Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large ...
- Mysql报错:Packet for query is too large (1121604 > 1048576).You can change this value on the server by setting the max_allowed_packet variable
看错误信息,发现1048576个字节,正好是1*1024*1024byte,也就是1Mb. 这正是mysql默认的max_allowed_packet值. 使用sql语句: show VARIABLE ...
- mysql Packet for query is too large (2036 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
解决方法: 打开控制台,输入下面语句,执行 set global max_allowed_packet = 20*1024*1024; 网上说要重启 mysql server, 我是执行完后不用重启就 ...
- Packet for query is too large (1660 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
原因是mysql 默认允许的 数据报包 是 1M 设置大一些就可以了 centos 下面 /ect/my.cnf 文件里面 加入或者修改 下面的参数 [mysqld] max_allowed_pa ...
- Linux服务器上日志报com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1783 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
在做查询数据库操作时,报了以上错误,还有out of memery heap hacp ,原因是MySQL的max_allowed_packet设置过小引起的,我一开始设置的是1M,后来改为了20M ...
随机推荐
- NGINX部署
- CentOS 6 - 升级内核
有的时候,需要升级Linux内核,今天我就是在CentOS 6中升级内核,在没有升级内核之前,我的CentOS 6只有2.6.32这一个内核,也是默认启动的内核.下面就开始一步步操作升级内核了! 一, ...
- Mysql分析-profile详解
一.前言当我们要对某一条sql的性能进行分析时,可以使用它. Profiling是从 mysql5.0.3版本以后才开放的.启动profile之后,所有查询包括错误的语句都会记录在内.关闭会话或者se ...
- MYSQL NULL值特性
NULL是一种“没有类型”的值,通常表示“无值”,“未知值”,“缺失值”,“超界”,“不在其中”等,我们在日常运用中很容易和NULL字符串混淆,这里大致整理了下NULL值的一些特性,以便能够正确使用N ...
- 了解ORACLE培训OCA-OCP-OCM课程表
了解ORACLE培训OCA-OCP-OCM课程表考试号: OCA 1Z0-007$125 Oracle Database 10g:SQL Fundamentals 本课程培养学生必要的SQ ...
- Gson简单使用
最近做个IM类型的Android 应用,由于有三种客户端(pc,ios,Android),所以底层使用的是C++与服务器通信,所以通信部分基本上有c++完成,封装好Jni即可,可以把底层c++通信看成 ...
- Python小白学习之路(十八)—【内置函数三】
一.对象操作 help() 功能:返回目标对象的帮助信息 举例: print(help(input)) #执行结果 Help on built-in function input in module ...
- C++命名空间、函数重载、缺省参数、内联函数、引用
一 .C++入门 1.C++关键字 2.命名空间 3.C++输入&输出 4.缺省参数 5.函数重载 6.引用 7.内联函数 8.auto关键字 9.基于范围的for循环 10.指针空值null ...
- OS之内存管理 ---基本的内存管理策略(二)
分段 基本方法 分段就是基于用户视图的内存管理方案.逻辑地址空间是由一组段构成的,每个段都有名称和长度.地址指定了段名称和段内偏移.因此用户通过两个量来指定地址:段名称和段偏移. 为了简单,进行对段的 ...
- [Python] 记录
错误处理 virtualenv 报错: 在中文文件夹中 unicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 17 ...