查询的数据包要大.设置max_allowed_pa​​cket [英] Packet for query to large. Setting max_allowed_packet

查看:100
本文介绍了查询的数据包要大.设置max_allowed_pa​​cket的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我通过phpmyadmin连接到我的数据库时,一切正常,它向我显示了数据. 当我在服务器上时,我可以看到所有数据并使用它.

When i connect to my databse via phpmyadmin everything works fine and it shows me the data. When i am on my server i can see all data and work with it.

但是当我尝试连接到服务器时,出现此错误:

But when i try to connect to my server i'm getting this error:

com.mysql.cj.jdbc.exceptions.PacketTooBigException: Packet for query is too large (4.739.923 > 65.535). You can change this value on the server by setting the 'max_allowed_packet' variable.

im在此处获取允许的最大数据包大小:

im getting the max allowed packet size here:


Database changed
MariaDB [selforder]> SELECT @@max_allowed_packet;
+----------------------+
| @@max_allowed_packet |
+----------------------+
|            536870912 |
+----------------------+
1 row in set (0.00 sec)

然后我将文件nano/root/.my.cnf更改为此:

and i changed my file nano /root/.my.cnf to this:

[mysqld]
max_allowed_packet=536870912

但我仍然收到此错误;

but i still get this error;

推荐答案

不是一个真正的答案,但是我的问题是,我安装了多个版本的mysql,我完全重新安装了系统

not really an answer but my problem was, that i installed multiple versions of mysql, i completly reinstalled my system

这篇关于查询的数据包要大.设置max_allowed_pa​​cket的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆