hive2.3.3安装记录

环境: win7 64位虚拟机Ubuntu18.04, hadoop2.7.6

 

mysql安装参考:

https://blog.****.net/u011026329/article/details/80835139 ——附带mysql账号密码设置

https://blog.****.net/sinat_21302587/article/details/76870457

https://www.cnblogs.com/longyuan-z/p/7739864.html ——deb安装(mysql-connector-java_8.0.12-1ubuntu18.04_all.deb)

hive安装:

https://www.cnblogs.com/dxxblog/p/8193967.html

https://blog.****.net/a123demi/article/details/72742279

 

然后自动装的mysql5.7.23, 并且没有输入创建数据库账号、密码之类的;然后发现对应配置信息在 /etc/mysql/debian.cnf 可以直接打开复制账号密码到hive的conf设置xml。

但是还需要个驱动jar,并且http://mvnrepository.com/artifact/mysql/mysql-connector-java是没有5.7的mysql版本的依赖的,要去官网找https://dev.mysql.com/downloads/connector/j/5.1.html ,而且名字不一样,是“MySQL Connector/J 8.0 is highly recommended for use with MySQL Server 8.0, 5.7, 5.6, and 5.5. Please upgrade to MySQL Connector/J 8.0.”  ,那就用这个8的deb吧,下载的时候要多点几下那2个红框的选项Ubuntu的就出来了。

hive2.3.3安装记录

 

 

附 部分命令参考:  

  757  sudo dpkg -c mysql-connector-java_8.0.12-1ubuntu18.04_all.deb 
  758  sudo dpkg -i mysql-connector-java_8.0.12-1ubuntu18.04_all.deb

  762  sudo find -name mysql-connector-java*.jar
  763  sudo apt-get isntall mysql-client
  764  sudo apt-get install libmysqlclient-dev
  765  sudo apt-get install libmysqlclient20
  768  sudo find -name mysql-connector-java*.jar
  773  cd /
  777  find -name mysql-connector-java* |less
  778  cp /usr/share/java/mysql-connector-java-8.0.12.jar /home/wenbin/bigdata/apache-hive-2.3.3-bin//lib/
  779  ll /home/wenbin/bigdata/apache-hive-2.3.3-bin//lib/mysql-connector-java*
  780  schematool -dbType mysql -initSchema
 

然后还没好。。。

[email protected]:/$ schematool -dbType mysql -initSchema
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/wenbin/bigdata/apache-hive-2.3.3-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/wenbin/bigdata/hadoop-2.7.6/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Metastore connection URL:     jdbc:mysql://127.0.0.1:3306/hive?createDatabaseIfNotExist=true
Metastore Connection Driver :     com.mysql.jdbc.Driver
Metastore connection User:     debian-sys-maint
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Tue Sep 18 10:34:55 CST 2018 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.
Starting metastore schema initialization to 2.3.0
Initialization script hive-schema-2.3.0.mysql.sql
Tue Sep 18 10:34:55 CST 2018 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.
Initialization script completed
Tue Sep 18 10:34:59 CST 2018 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.
schemaTool completed
 

hive也还不能启动,暂时记录,用空在搞

Exception in thread "main" java.lang.NoSuchMethodError: com.ibm.icu.impl.ICUBinary.getRequiredData(Ljava/lang/String;)Ljava/nio/ByteBuffer;
    at com.ibm.icu.charset.UConverterAlias.haveAliasData(UConverterAlias.java:131)
    at com.ibm.icu.charset.UConverterAlias.getCanonicalName(UConverterAlias.java:525)
    at com.ibm.icu.charset.CharsetProviderICU.getICUCanonicalName(CharsetProviderICU.java:126)
    at com.ibm.icu.charset.CharsetProviderICU.charsetForName(CharsetProviderICU.java:62)
    at java.nio.charset.Charset$2.run(Charset.java:412)