Wed Sep 19 20:48:46 CST 2018 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 mus

时间:2021-07-20 11:05:17

Wed Sep 19 20:48:46 CST 2018 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.

大概意思是当前的SSL连接不安全建议加userSSl=true

改后的代码如下:

jdbc:mysql://localhost:3306/regionaldata?useUnicode=true&characterEncoding=utf-8&useSSL=true

ssl是一种加密技术在客户端连接数据库的中间做了加密,TCP/IP层中。

还有出现错误的原因是配置出错。

例如:

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

这一句说明是mysql的用户密码不对,查看一下密码是否正确