起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6212|回复: 3

[处理中3] 数据库断开连接

[复制链接]

98

主题

271

帖子

732

积分

高级会员

Rank: 4

积分
732
QQ
发表于 2018-10-13 10:30:36 | 显示全部楼层 |阅读模式
本帖最后由 木土 于 2018-10-13 10:32 编辑

MySQL数据库断开连接
The last packet successfully received from the server was 594,881 milliseconds ago.  The last packet sent successfully to the server was 594,902 milliseconds ago.
已经在tomcat的配置中增加mysql中validationQuery=”select current_date”或者validationQuery=” select current_time”


现在出现新的问题
Sat Oct 13 10:27:55 CST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

31

主题

1856

帖子

3070

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3070
发表于 2018-10-13 22:25:16 | 显示全部楼层
ssl的问题,可禁用,jdbc连接这样
jdbc:mysql://mysql:3306/dbname?useSSL=false&requireSSL=false
回复 支持 反对

使用道具 举报

98

主题

271

帖子

732

积分

高级会员

Rank: 4

积分
732
QQ
 楼主| 发表于 2018-10-15 16:24:27 | 显示全部楼层
这个是写在Tomcat的context.xml配置文件中的吗
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36198
发表于 2018-10-15 16:37:30 | 显示全部楼层
配置数据源的时候url直接这样写就可以,或者自己到Tomcat的context.xml配置文件中修改
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2025-8-28 15:16 , Processed in 0.053804 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表