导入 SQL 文件时报错:MySQL server has gone away

这句话的意思是 MySQL 服务器已经关闭。

首先查看 MySQL 服务是否开启

打开任务管理器查看服务中 是否有 MySQL 服务

这里写图片描述

如果确认 MySQL 服务已启动,就可能是导入的 sql 文件过大,MySQL 容不下,可以改变一个数据容量参数

进入 MySQL 命令行,设置可容纳 180 M的数据

mysql > set global max_allowed_packet = 1024 * 1024 * 180;

猜你喜欢

转载自blog.csdn.net/qq_37581282/article/details/82556424
今日推荐