当前位置:网站首页>Using MySQL in Ubuntu/Linux environment: Solve the problem of com.mysql.jdbc.PacketTooBigException: Packet for query is too large
Using MySQL in Ubuntu/Linux environment: Solve the problem of com.mysql.jdbc.PacketTooBigException: Packet for query is too large
2022-08-09 00:32:00 【Daughter controls fake full stack Lao Xu】
OS: Ubuntu 17.04 64-bit
MySQL version: MySQL 5.7
1. Questions
In the process of developing with MySQL, it is easy to encounter the following exceptions thrown by MySQL when saving large files:
Packet for query is too large
The reason for this error is because MySQL restricts data write operations, limiting the upper limit of the data size for a single write operation.
To solve this problem is very simple, just modify the configuration of MySQL.
2. Resolve
2.1 find the configuration file
mysqld.cnf

/etc/mysql/mysql.conf.d/mysqld.cnf

2.2 Modify the configuration file
max_allowed_packet = 30M
The right side of the equation is the upper limit of the maximum written data, which can be modified according to your actual needs.The development environment can be appropriately larger, but the production environment should be controlled a little smaller.
边栏推荐
- 图像超分辨率重建概述
- 【科研-学习-pytorch】7-梯度、激活函数和loss
- 一道dp的三次优化(时间+空间)
- 2021.10.7 2020 CCPC重现赛
- Unity3D小白学习日记(02):U3D如何连接SQL SERVER数据库(亲测可行!)
- 2020-10-17
- 整流十四---直接功率控制策略
- 牛客小白月赛 37 补题
- Using MySQL in Ubuntu/Linux environment: Modify the database sql_mode to solve the "this is incompatible with sql_mode=only_full_group_by" problem
- 2021 icpc 上海 H. Life is a Game
猜你喜欢
随机推荐
【科研-学习-pytorch】3-分类问题
cmd切换硬盘的命令,从C盘切换到D盘怎么操作
笔记&代码 | 统计学——基于R(第四版) 第十一章 时间序列预测
动态style定义背景渐变
GaN图腾柱无桥 Boost PFC(单相)四(仿真理解)
centos7 yum 安装最新版redis
Unity学习笔记--摄像机插值跟随
微信企业号开发之接收响应消息
在vscode中编辑、编译、下载Keil工程
Several ways to implement inheritance in js
微信企业号开发之获取AccessToken
AutoX安途杯中山大学程序设计校赛(同步赛)
整流九—双同步坐标系锁相原理
aspx结尾文件网站的发布过程
注意:服务器
对付流氓软件
[GYCTF2020]Ezsqli-1|SQL注入
笔记&代码 | 统计学——基于R(第四版) 第九章一元线性回归
【科研-学习-pytorch】2-线性回归
什么是阿里云服务器系统盘和数据盘?