Java连接mysql——Establishing SSL connection without server's identity verification is not recommended.

  Establishing SSL connection without server's identity verification is not recommended.


  出现这个错误的原因是因为mysql版本问题,不同的mysql对ssl使用情况不一样,尝试不采用ssl连接即可。操作方法如下。

正常情况下访问的url

String url = "jdbc:mysql://192.168.61.123:3306/cpc";

改正后的url

String url = "jdbc:mysql://192.168.61.123:3306/cpc?useSSL=false";

即不使用ssl。

原文地址:https://www.cnblogs.com/GoForMyDream/p/8559139.html