Myeclipse连接MySQL数据库出现SSL问题

具体实现MyEclipse安装JDBC驱动程序请看这位博主的博客
http://blog.csdn.net/xin917480852/article/details/52439858
在此就不一一叙说了直接说安装完成后建立连接出现以下问题

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.

解决办法,在传入进去的url地址
URL=”jdbc:mysql://127.0.0.1:3306/loukundb2”;
加上
?useSSL=false

即url为

"jdbc:mysql://127.0.0.1:3306/loukundb2?useSSL=false";  

就没有问题了。

猜你喜欢

转载自blog.csdn.net/karmacode/article/details/78758838