Mysql连接时警告提示【WARN: Establishing SSL connection without server's identity verification is not recomm】

问题描述

Mysql连接时能正确返回结果但是有警告,大概意思是:说建立ssl连接,但是服务器没有身份认证,这种方式不推荐使用。
这里写图片描述

解决方案

在URL链接后加上 ?useUnicode=true&characterEncoding=utf-8&useSSL=false
例如:
(原来的)
mysqlURL=”jdbc:mysql://localhost:3306/class”
(更改为)
mysqlURL=”jdbc:mysql://localhost:3306/class?useUnicode=true&characterEncoding=utf-8&useSSL=false”

猜你喜欢

转载自blog.csdn.net/qq_28202661/article/details/79655296
今日推荐