JDBC连接mysql时出现的ssl问题
2018-03-08 17:59
204 查看
使用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");
问题解决。
相关文章推荐
- JDBC连接MySQL出现的问题
- Java使用mysql-jdbc连接MySQL出现如下警告: WARN: Establishing SSL connection without server's identity 。。。
- JDBC连接MySQL出现的问题
- JDBC连接MySQL出现的问题
- JDBC连接MySQL出现的问题
- 解决Mybatis连接Sql server 出现 Cannot load JDBC driver class 'com.mysql.jdbc.Driver '的问题
- 连接mysql时出现的各种异常问题
- 连接数据库时出现java.lang.ClassNotFoundException: com.mysql.jdbc.Driver怎么修改
- jdbc连接问题 Class.forName("com.mysql.jdbc.Driver");的作用
- 【PHP问题大全】--PHP连接MySQL出现乱码的编码解决办法
- 关于java连接mysql出现中文乱码的问题
- ssm整合时,通过jdbc.properties文件无法连接mysql问题
- 解决 Navicat for Mysql连接mysql出现10038问题
- 使用powerdesigner连接数据库时出现Non SQL Error : Could not load class com.mysql.jdbc.Drive
- fedora 18~20 中Qt 5.2.1 解决连接mysql数据库出现QMYSQL driver not loaded的问题
- mysql4.1以上版本连接时出现Client does not support authentication protocol #1251错误问题解决办法
- navicat连接CentOS的mysql在创建存储过程时出现1146 - Table ‘mysql.proc’ doesn't exist的问题
- JDBC连接MySQL 插入中文数据的乱码问题
- mysql4.1以上版本连接时出现Client does not support authentication protocol问题解决办法
- tomcat使用jdbc连接mysql出现的错误