当前位置:网站首页>【网站小白】mySQL数据库异常断开
【网站小白】mySQL数据库异常断开
2022-08-11 05:14:00 【4576号菜鸟】
【报错】org.hibernate.exception.JDBCConnectionException: could not execute query
【描述】
网站部署好之总是隔一段时间就连不上数据库,报org.hibernate.exception.JDBCConnectionException: could not execute query错误
【原因】
mysql数据库默认连接时是8个小时
如果超过8小时没有与数据库的连接,再次链接数据库就会报这个错误.
【解决】
步骤一:进入数据库,看一下wait_timeout 的值:
Show global variables like 'wait_timeout';
28800 就是8小时
步骤二:修改wait_timeout的值:
Set global wait_timeout=1814400;
步骤三:最后重启tomcat.
边栏推荐
- pytorch和tensorflow函数对应表
- 面试宝典一: code题目记录
- Configure checkstyle in IDEA
- 批量修改数据库等视频文件名称
- 【无标题】2022年胺基化工艺考试题模拟考试题库及在线模拟考试
- 普林斯顿微积分读本05第四章--求解多项式的极限问题
- BGP Comprehensive Experiment
- 阿里天池学习赛 新闻文本分类
- Django--20 implements Redis support, context, and interaction of context and interface
- Tips to improve your productivity, you have to know - Navitcat shortcuts
猜你喜欢

Use Adobe genuine software for prostitution to reduce the slow employment and non-employment of fresh graduates

Flask框架学习:路由的尾部斜杠

每周推荐短视频:你常用的拍立淘,它的前身原来是这样的!

【Redis】Redis 的安装及图形化界面 Redis DeskTop Manager 的安装与使用

【嵌入式开源库】cJSON的使用,高效精简的json解析库

(2) Docker installs Redis in practice (persistent AOF and RDB snapshots)
![[Embedded open source library] The use of MultiButton, an easy-to-use event-driven button driver module](/img/7b/e265305df01eb405a131d0de2154d3.png)
[Embedded open source library] The use of MultiButton, an easy-to-use event-driven button driver module

(三)性能实时监控平台搭建(Grafana+Prometheus+Node_explorer+Jmeter)

Four functional interfaces

第二篇 DS5 Armv8 样例工程报错之GCC编译
随机推荐
Golden Warehouse Database KingbaseGIS User Manual (6.8. Geometry Object Input Function)
2022 building welder (building a special type of work) examination questions and simulation test
基于 TF-IDF 文本匹配实战详细教程 数据+代码 可直接运行
Mysql入门练习
Thymeleaf
Redis-使用jedis连接linux中redis服务器失败的解决方案
MFC Interprocess Communication (Shared Memory)
DS220702-0707作业
Use Adobe genuine software for prostitution to reduce the slow employment and non-employment of fresh graduates
原生态mongo连接查询代码
Golden Warehouse Database KingbaseGIS User Manual (6.10. Geometric Object Operation Operator)
软件测试风险识别
(一)性能实时监控平台搭建(Grafana+Influxdb+Jmeter)
课堂练习--0708
JedisLock_Redis分布式锁实现_转载
Keras与tensorflow 使用基础
log4j2漏洞复现以及解决方案
【嵌入式开源库】MultiTimer 的使用,一款可无限扩展的软件定时器
redis分布式锁
CentOS7静默安装Oracle11g_转载

