티스토리 뷰

mysql 8.x나 5.x에서 데이터베이스 접속 암호를 암호화 처리 하는 경우 다음과 같은 오류가 발생할 수 있습니다. 이럴 때는 데이터베이스 커넥션 스트링에 옵션을 추가하여 문제를 해결할 수 있습니다.

 

오류 : Public Key Retrieval is not allowed

$ /opt/hive/bin/schematool -dbType mysql -initSchema
Metastore connection URL:	 jdbc:mysql://xxx.xx:3306/db_name?useSSL=false
Metastore Connection Driver :	 com.mysql.cj.jdbc.Driver
Metastore connection User:	 sha256_user
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
Underlying cause: java.sql.SQLNonTransientConnectionException : Public Key Retrieval is not allowed
SQL Error code: 0
Use --verbose for detailed stacktrace.
*** schemaTool failed ***

 

해결방법: hive-site 커넥션 스트링에 allowPublicKeyRetrieval 옵션 추가

    <property>
        <name>javax.jdo.option.ConnectionURL</name>
        <value>jdbc:mysql://xxx.xx:3306/db_name?allowPublicKeyRetrieval=true&amp;useSSL=false</value>
    </property>
반응형
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/03   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
글 보관함