栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Communications link failure The last packet sent successfully to the server was 0 milliseconds ago.

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Communications link failure The last packet sent successfully to the server was 0 milliseconds ago.

Mac在运行mybatis-generator插件时遇到错误

Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.4.0:generate (default-cli) on project springboot: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

尝试修改MySQL超时时间,使用命令行登录MySQL

mysql -u root -p

进入MySQL后,使用命令查看超时时间配置

show variables like '%timeout%';

一、修改配置

我们需要到 my.cnf 配置文件中修改 interactive_timeout和wait_timeout两个参数的值,
在Mac中安装完MySQL后,my.cnf配置文件需要自己手动创建

cd /usr/local/etc
mkdir mysql
cd mysql
touch my.cnf
vim my.cnf

填入内容,保存关闭

[mysqld]
wait_timeout = 38800
interactive_timeout = 38800
二、使用配置文件

进入设置,选用刚才创建的配置文件

停止服务后重新启用即可

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/310071.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号