Establishing SSL connection without server's identity verification is not recommended警告原因是mysql在高版本中

在eclipse中部署Javaweb项目连接数据库报

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

错误时有两种可能:

1.原因是mysql在高版本中需要显式指定是否进行SSL连接。

在连接mysql配置文件中添加ssl=true即可

connectionURL="jdbc:mysql://localhost:3306/xxxxx?useSSL=true"

2.上述操作后仍报错,无法连接数据库服务则可能是在tomcat  lib目录下的MySql驱动和web项目WEB-INF/lib 目录下的MySq驱动版本号不同

 

 

你可能感兴趣的:(Establishing SSL connection without server's identity verification is not recommended警告原因是mysql在高版本中)