youngjuning / issues

一寸欢喜 - 怕什么真理无穷,进一寸有一寸的欢喜
https://youngjuning.js.org
44 stars 4 forks source link

MySQL WARN: Establishing SSL connection without server's identity verification is not recommended. #202

Closed youngjuning closed 5 years ago

youngjuning commented 5 years ago

首先恭喜,出现这个的时候MySQL说明已经安装成功了,这是警告不是错误,以后使用是不影响的。大概的意思就是说建立ssl连接,但是服务器没有身份认证,这种方式不推荐使用。

Java 解决方法

将原来的连接:

Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "your_pass");

改为:

Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/test?useSSL=false","root", "your_pass");