解决 c3p0报错 Establishing SSL connection without server's identity verification is not recommended
Posted 诺虫的箱子
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决 c3p0报错 Establishing SSL connection without server's identity verification is not recommended相关的知识,希望对你有一定的参考价值。
解决 c3p0报错 Establishing SSL connection without server\'s identity verification is not recommended
?useSSL=false
<c3p0-config>
<default-config>
<property name="driverClass">com.mysql.jdbc.Driver</property>
<property name="jdbcUrl">jdbc:mysql://127.0.0.1:3306/jdbc?useSSL=false</property>
<property name="user">root</property>
<property name="password">root</property> </default-config>
</c3p0-config>
解决: Establishing SSL connection without server‘s identity verification is not recommended. Accord(代码
我在slave1上启动hive时一直循环
Mon Aug 16 15:47:55 CST 2021 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.
百度后找到解决方案
1.进入hive的conf 目录修改hive-site.xml
cd /usr/hive/apache-hive-2.1.1-bin/conf
vi hive-site.xml
2.找到下面这个内容
<!--数据库连接JDBC的URL地址-->
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://slave2:3306/hive?createDatabaseIfNotExist=true</value>
</property>
<!--数据库连接driver,即MySQL驱动-->
<property>
3.修改<value>
那一行,并在下面加上<description>
那一行~
修改前:
<value>jdbc:mysql://slave2:3306/hive?createDatabaseIfNotExist=true</value>
修改后:
<value>jdbc:mysql://slave2:3306/hive?createDatabaseIfNotExist=true&characterEncoding=UTF-8&useSSL=false</value>
<description>JDBC connect string for a JDBC metastore</description>
改完是这样的
再启动hive,成功!
以上是关于解决 c3p0报错 Establishing SSL connection without server's identity verification is not recommended的主要内容,如果未能解决你的问题,请参考以下文章
Error establishing a database connection是怎么回事啊
Idea中使用jdbc报错:Wed Mar 21 09:28:33 CST 2018 WARN: Establishing SSL connection without server's id