hive 初始化數據庫報錯


安裝hive,初始化數據庫的時候報錯

schematool -dbType mysql -initSchema

Metastore Connection Driver : com.mysql.cj.jdbc.Driver
Metastore connection User:    hive
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
Underlying cause: java.sql.SQLNonTransientConnectionException : Public Key Retrieval is not allowed

網上搜了很多教程,解決不了。

mysql授權什么的都做了,換mysql版本,不行。

 <property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://127.0.0.1:3306/hive?useUnicode=true&amp;characterEncoding=utf8&amp;useSSL=false&amp;serverTimezone=GMT</value>
    <description>
      JDBC connect string for a JDBC metastore.
      To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL.
      For example, jdbc:postgresql://myhost/db?ssl=true for postgres database.
    </description>
  </property>

今天再盯着配置文件看,發現配置jdbc鏈接的字符串里有&amp,恍然大悟,亂碼都刪了,再初始化,成功!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM