报错信息:
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,要不然看不到效果

mysql报错:Cause: com.mysql.jdbc.PacketTooBigException的更多相关文章

  1. 启动Mysql报错:Another MySQL daemon already running with the same unix socket.

    启动Mysql报错: Another MySQL daemon already running with the same unix socket. 删除如下文件即可解决 /var/lib/mysql ...

  2. springboot连接mysql报错:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

    nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. ...

  3. Linux 登录 MySQL 报错, 解决bash: mysql: command not found 的方法

    原因:这是由于系统默认会查找/usr/bin下的命令,如果这个命令不在这个目录下,当然会找不到命令,我们需要做的就是映射一个链接到/usr/bin目录下,相当于建立一个链接文件. 首先得知道mysql ...

  4. Linux环境下mysql报错:bash: mysql: command not found 的解决方法

    # mysql -u root-bash: mysql: command not found 原因:这是由于系统默认会查找/usr/bin下的命令. 如果这个命令不在这个目录下,当然会找不到命令. 我 ...

  5. ImportError: No module named mysql 报错python引用mysql报错

    需要安装 pip2.7 install MySQL-python pip2.7 install mysql-connector

  6. MySQL报错解决:The MySQL server is running with the --read-only option so it cannot execute this statement

    MySQL报错:The MySQL server is running with the --skip-grant-tables option so it cannot execute this st ...

  7. java项目连接jdbc报错:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server

    java项目连接jdbc报错:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not creat ...

  8. Java连接数据库报错:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

    解决方案 连接Mysql报错 The last packet sent successfully to the server was 0 milliseconds ago. The driver ha ...

  9. 使用Mybatis连接到Mysql报错,WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be esta

    在Eclipse中使用springboot整合Mybatis,连接到5.7版本Mysql报错WARN: Establishing SSL connection without server's ide ...

  10. mysql报错this is incompatible with sql_mode=only_full_group_by

    1.报错信息 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP ...

随机推荐

  1. 代码合并工具Beyond Compare的使用技巧

    使用技巧 文件合并 过滤 https://edi.wang/post/2013/2/17/using-beyond-compare 文件夹比较 http://www.beyondcompare.cc/ ...

  2. (七)修改上一条SQL语句,NULL值的滤空函数nvl

    修改上一条SQL语句 1.用c命令来修改(c 即 change ) 默认,光标闪烁位置指向上一条SQL语句的第一行.输入二则定位到第二行. c /错误的关键字/正确的关键字 SQL form emp; ...

  3. 第三十八篇-logcat的使用

    很多時候,程序有问题时都需要debug,一般会设置几个信息点,查看程序是否运行,之前学过Toast,可以广播,但是终归是不太方便,今天学习一下logcat的用法. logcat里面是一些日志,内容太多 ...

  4. Vector使用测试

    1.测试vector是否自动释放分配的空间 vector有大致两类申请空间的方式,一是vector(n,T()),一是vector(p,p+n)(p是自己申请的空间的指针). 其中第一种估计肯定会释放 ...

  5. HTTP请求头和响应头的格式

    请求头: 请求头肯定带着客户端信息,比如host主机名,User-Agent用户代理信息,Cookie等等  响应头: 响应头带有服务端信息:Server服务器信息,Last-Modified最后修改 ...

  6. django系列 1 :python+django环境搭建 +mac提示找不到manage.py命令

    1.安装python3 2.设置python3的环境变量 3.进入命令行模式,输入 pip install django 1.10.3 4.验证是否安装完成 pip show django 5.dja ...

  7. php递归函数中使用return的注意事项

    php递归函数中使用return的时候会碰到无法正确返回想要的值得情况,如果不明白其中的原因,很难找出错误的,就下面的具体例子来说明一下吧: function test($i){ $i-=4; if( ...

  8. 表连接join on

    表A记录如下:  aID aNum  1 a20050111  2 a20050112  3 a20050113  4 a20050114  5 a20050115  表B记录如下:  bID bNa ...

  9. python: 基本知识(一)

    从今天开始继续python的学习,将应用到到黑客学习中,一边学习黑客知识一边学习python. 1.类:(封装) class T: def  __init__(self,...): //类对象创建后调 ...

  10. mysql执行update报错 Err] 1055 - 'information_schema.PROFILING.SEQ' isn't in GROUP BY

    mysql执行update报错 Err] 1055 - 'information_schema.PROFILING.SEQ' isn't in GROUP BY 今天开发的同事发来如下错误信息,最最简 ...