我在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,成功!
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/294420.html
標籤:其他
上一篇:運營商大資料實時獲客
