解决JDBC连接MYSQL发出的警告:Sun May 03 16:39:29 CST 2020 WARN: Establishing SSL connection without server‘s i

在用JDBC链接MYSQL时出现的:Sun May 03 16:39:29 CST 2020 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加上"?useSSL=false"
未加前会出现上图错误:
未加前的
已加后:
已加后
连接成功:
未报错
具体请看原文:https://blog.csdn.net/dianyanxia/article/details/84026059
作者:说好今夜不点烟

你可能感兴趣的:(解决JDBC连接MYSQL发出的警告:Sun May 03 16:39:29 CST 2020 WARN: Establishing SSL connection without server‘s i)