[SQL] Query db_2020-11-30 start
[ERR] 2006 - MySQL server has gone away
[ERR] -- MySQL dump 10.13 Distrib 5.7.19, for Win64 (x86_64)
MySQL 对 max_allowed_packect 允许最大的数据包的大小有限制,我们执行的文件超过了这个限制就会报这个错误。可以通过 select @@max_allowed_packet;
查看当前最大限制(单位为字节 B)。
mysql> select @@max_allowed_packet;
+----------------------+
| @@max_allowed_packet |
+----------------------+
| 4194304 |
+----------------------+
1 row in set (0.02 sec)
通过 set global max_allowed_packet = maxNum;
增加 max_allowed_packect 的大小即可;
mysql> set global max_allowed_packet = 1024 * 1024 * 1024;
Query OK, 0 rows affected (0.00 sec)
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有