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+ requiremen

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
云数据库 RDS MySQL Serverless,价值2615元额度,1个月
简介: 使用idea编写程序连接数据库时出现以下问题使用MySQL数据库时出现如下错误:WARN: Establishing SSL connection without server's identity verification is not recommended.

使用idea编写程序连接数据库时出现以下问题

使用MySQL数据库时出现如下错误:

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.

网上查了查,是当前版本的MySQL要求使用SSL,做出如下修改即可:

connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/jsp_db","root","123456");

改成

connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/jsp_db?useSSL=false","root","123456");

问题解决。



作者:南大
链接:http://www.jianshu.com/p/a813450f5341
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
1月前
|
SQL 关系型数据库 MySQL
SQL Error (2013): Lost connection to MySQL server at 'waiting for initial communication packet', sys...
SQL Error (2013): Lost connection to MySQL server at 'waiting for initial communication packet', sys...
|
28天前
|
关系型数据库 MySQL
navicate远程mysql时报错: connection isbeing used
如果以上方法都无法解决问题,可能需要进一步查看错误日志或考虑联系 Navicat 官方支持获取更详细的帮助。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
14 0
|
1月前
|
缓存 关系型数据库 MySQL
mysql报Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts‘。
mysql报Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts‘。
12 0
|
6月前
|
关系型数据库 MySQL 数据库
解决Navicat报错:2013 - Lost connection to MySQL server during query
解决Navicat报错:2013 - Lost connection to MySQL server during query
261 0
|
7月前
|
应用服务中间件 网络安全 nginx
nginx开启ssl报错: [emerg] "server" directive is not allowed here ...
nginx开启ssl报错: [emerg] "server" directive is not allowed here ...
126 0
|
7月前
|
关系型数据库 MySQL 数据安全/隐私保护
MySQL安装--connect to server的界面上输入密码显示connection failed
MySQL安装--connect to server的界面上输入密码显示connection failed
215 0
|
7月前
|
网络安全
解决WARN: Establishing SSL connection without server‘s identity verification is not recommended警告问题~
解决WARN: Establishing SSL connection without server‘s identity verification is not recommended警告问题~
|
3月前
|
域名解析 应用服务中间件 Linux
【服务器】使用域名解析服务器的IP地址并配置SSL证书
【服务器】使用域名解析服务器的IP地址并配置SSL证书
513 0
|
3月前
|
前端开发 应用服务中间件 Linux
nginx解决springcloud前后端跨域问题,同时配置ssl
nginx解决springcloud前后端跨域问题,同时配置ssl