当前位置:   article > 正文

hive连接mysql出现 useSSL=false, or set useSSL=true

hive连接mysql出现 useSSL=false, or set useSSL=true

关于hive连接mysql出现 WARN Establishing SSL connection without server’s identity verification is not recommended.······· useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

在这里插入图片描述

修改hive的配置文件 (第10行)

[root@hadoop102 conf]# pwd
/opt/module/hive/conf
[root@hadoop102 conf]# vim hive-site.xml 

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://hadoop102:3306/metastore?createDatabaseIfNotExist=true</value>
    <description>JDBC connect string for a JDBC metastore</description>
</property>
        <property>
          <name>javax.jdo.option.ConnectionDriverName</name>
          <value>com.mysql.jdbc.Driver</value>
          <description>Driver class name for a JDBC metastore</description>
        </property>

        <property>
          <name>javax.jdo.option.ConnectionUserName</name>
          <value>root</value>
          <description>username to use against metastore database</description>
        </property>

        <property>
          <name>javax.jdo.option.ConnectionPassword</name>
          <value>zc1234</value>
          <description>password to use against metastore database</description>
        </property>

        <property>
        <name>hive.cli.print.header</name>
        <value>true</value>
        </property>

        <property>
        <name>hive.cli.print.current.db</name>
        <value>true</value>
        </property>

        <property>
        <name>hive.execution.engine</name>
        <value>tez</value>
        </property>
</configuration>

  • 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
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46

将第10行改为:

jdbc:mysql://hadoop102:3306/metastore?createDatabaseIfNotExist=true&amp;useSSL=false
  • 1

修改后如下:

[root@hadoop102 conf]# pwd
/opt/module/hive/conf
[root@hadoop102 conf]# vim hive-site.xml 

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://hadoop102:3306/metastore?createDatabaseIfNotExist=true&amp;useSSL=false</value>
    <description>JDBC connect string for a JDBC metastore</description>
</property>
        <property>
          <name>javax.jdo.option.ConnectionDriverName</name>
          <value>com.mysql.jdbc.Driver</value>
          <description>Driver class name for a JDBC metastore</description>
        </property>

        <property>
          <name>javax.jdo.option.ConnectionUserName</name>
          <value>root</value>
          <description>username to use against metastore database</description>
        </property>

        <property>
          <name>javax.jdo.option.ConnectionPassword</name>
          <value>zc1234</value>
          <description>password to use against metastore database</description>
        </property>

        <property>
        <name>hive.cli.print.header</name>
        <value>true</value>
        </property>

        <property>
        <name>hive.cli.print.current.db</name>
        <value>true</value>
        </property>

        <property>
        <name>hive.execution.engine</name>
        <value>tez</value>
        </property>
</configuration>

  • 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
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46

保存并退出

然后再从新连接 hive

在这里插入图片描述之前的:
Mon Nov 23 22:01:11 CST 2099 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.
不见了

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/429609
推荐阅读
相关标签
  

闽ICP备14008679号