报错信息:
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. MVC之 自定义过滤器(ActionFilterAttribute)

    一.自定义Filter 自定义Filter需要继承ActionFilterAttribute抽象类,重写其中需要的方法,来看下ActionFilterAttribute类的方法签名. //表示所有操作 ...

  2. 真的无语, 今天遇到一个奇葩的事情: http 会话劫持

    今天一个用户反应说软件一运行就提示错误,然后关闭. 然后用户截屏发给我看了一下,我一看,无语了. 在软件中显示的正常一段文字说明尾部出现 <script src="http://ad. ...

  3. jasperreport

     我们的报表要用FusionCharts.jasperreport

  4. python 装饰器的应用

    import time def test1(): print "hello\n" print test1.__name__ def test2(): print "hel ...

  5. Ubuntu17安装Chrome有效

    http://blog.csdn.net/NFMSR/article/details/78348000 1.进入 Ubuntu 16.04 桌面,按下 Ctrl + Alt + t 键盘组合键,启动终 ...

  6. C++基础知识--DAY2

    昨天我们主要是讲的C++相对于C语言的变化,结尾讲述了一点引用的基础知识,要明白,引用就是对一个变量取别名,在C++中需要用指针的都可以思考是否可以用引用来代替. 1. 常引用 常引用(const s ...

  7. js中两种定时器,setTimeout和setInterval的区别

    setTimeout只在指定时间后执行一次,代码如下:   <script>   //定时器 异步运行   function hello(){   alert("hello&qu ...

  8. 表格模型的监听 TableModelListener

    当表格内容发生改变,监听做了哪些操作,需要表格模型的监听 TableModelListener来实现. 以上一个随笔内容<高级组件——表格模型TableModel>为例,增加监听事件内容. ...

  9. RHCSA考试真题

    2018年 RHCSA考试真题... ------------ 考前需要做的基础 破解root密码 KVM虚拟机与VM虚拟机 主机名:station.domain1.example.comIP地址:1 ...

  10. JSON与XML之间的转换

    public class JsonTest { private final Logger cLogger = Logger.getLogger(getClass()); /** * XML转JSON ...