The driver has not received any packets from the server.
在进行mybatis连接数据库进行操作时,报以下错误;
The driver has not received any packets from the server.
MySQL服务器默认的“wait_timeout”是28800秒即8小时,
意味着如果一个连接的空闲时间超过8个小时,MySQL将自动断开该连接,
而连接池却认为该连接还是有效的(因为并未校验连接的有效性),
当应用申请使用该连接时,就会导致上面的报错。
解决方案如下:
Linux系统:
修改MySQL的参数,wait_timeout最大为31536000即1年,在my.cnf中加入:
[mysqld]
wait_timeout=31536000
interactive_timeout=31536000
windows:
没有找到my.ini,我的电脑是重启了之后才连接不上的,于是我去查找了mysql服务,结果也找不到,接着我去修改了mysql安装:
在这里勾选跟随系统启动,这样就不会出现连接不上的问题了,对于网络上提出的连接超时不存在的,因为我是重启了系统的,本应该连接也重新计算,所以希望你们不要踩这个坑。
The driver has not received any packets from the server.相关推荐
- The driver has not received any packets from the server,java.net.ConnectException: Connection refuse
文章目录 问题一.idea中db navigator插件 The driver has not received any packets from the server或者是database对话框ja ...
- Mysql连接datagrip 报错 :The driver has not received any packets from the server.
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.(linux中关于mysql相关命令)
原因: 1.呃呃.重启服务器,没有重新启动mysql; 2.如果还不能连接可能是3306是不允许进行远程连接的,所以在防火墙中设置3306开启远程服务: /sbin/iptables -I INPUT ...
- 错误:The driver has not received any packets from the server.
错误:The driver has not received any packets from the server. 用 mysql 8.*的依赖去连接 mysql 5 时报错 用 mysql 8. ...
- 遇到的问题:The driver has not received any packets from the server
今天新拉了一个项目,点击是碰到数据库的错误, Communications link failure The driver has not received any packets from the ...
- The driver has not received any packets from the server
解决方法: jdbc的url添加参数: jdbc.url=jdbc:mysql://localhost:3306/totosea?useUnicode=true&characterEncodi ...
- 连接mysql时报错:The driver has not received any packets from the server.
连接mysql时报错. 前几天可以打开的数据库也不能打开,报java.net.ConnectException: Connection refused: connect.错误. 报错原因:mysql服 ...
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
tomcat服务启动链接mysql报错: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failu ...
- Received status code 403 from server: ForbiddenDisable Gradle ‘offline mode‘ and sync project
Could not HEAD 'https://dl.bintray.com/umsdk/release/cn/rongcloud/sdk/im_lib/4.0.3.15/im_lib-4.0.3.1 ...
最新文章
- Oracle数据库中有关记录个数的查询
- 【数据结构】栈的压入、弹出序列
- 魔兽世界---屠夫(Just a Hook)
- html5css3js文件作业,HTML5 CSS3 JavaScriptWeb前端开发自测试卷2.docx
- python维度变换_Python NumPy用法
- 如何通过link_to传递一个post请求
- 康华光电子技术基础第六版习题答案
- 【转载】北京三险一金计算器
- 电动车电池bms电池管理系统 锂电池算法SOC代码 获取锂电池SOC采用的是电流积分法,电化学阻抗法
- 脚本之家去广告JS插件
- Mac下载软件的网站
- Python实现的无法拒绝的情人节表白代码,python情人节表白代码
- 什么是4:4:4、4:2:2、4:2:0?了解图像压缩取样的方式
- windows 空会话 ipc$域控 SYSVOL 和NETLOGON共享
- micro-app-vue2 vue3 超详细快速入门指南 学习记录
- 快速接入腾讯TUIKaraoke在线 K 歌场景
- [转载]关于如何选择5D2和6D的忠告
- 计算机专业开题报告论证记录如何写,开题论证记录
- Codeforces 1334 C. Circle of Monsters
- 基于汇编和C语言STM32流水灯依次闪烁