欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

hive启动警告:EstablishingSSLconnectionwithoutserver'sidentityverificationisnotre

程序员文章站 2022-09-28 12:35:39
启动hive报警告:Establishing SSL connection without server's identity verification is not recommen...

启动hive报警告: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

根据提示在hive配置文件hive-site.xml中修改javax.jdo.option.ConnectionURL参数

修改前:

jdbc:mysql://10.10.110.110:3306/hive?characterEncoding=utf8&useSSL=false

修改后:

jdbc:mysql://10.10.110.110:3306/hive?characterEncoding=utf8&useSSL=false

启动hive后报错,出现The reference to entity "useSSL" must end with the ';' delimiter错误,查询一番后发现原来在xml文件中 &符号 需要转义 这个根据 HTML 的转义规则 更改就行
& ->&于是便解决了。

正确配置:

jdbc:mysql://10.10.110.110:3306/hive?characterEncoding=utf8&useSSL=false