hive2.3+mysql_hive2.3.7安装

1.安装包下载

2.上传安装包以及mysql驱动包

scp Downloads/apache-hive-2.3.7-bin.tar.gz root@hadoop003:/root/

scp Downloads/mysql-connector-java-5.1.47.jar root@hadoop003:/root/

3.解压安装包

[root@hadoop003 ~]# tar -zxvf apache-hive-2.3.7-bin.tar.gz -C /usr/local/cluster/

[root@hadoop003 ~]# chown hadoop:hadoop -R /usr/local/cluster/apache-hive-2.3.7-bin/

[root@hadoop003 lib]# mv ~/mysql-connector-java-5.1.47.jar /usr/local/cluster/apache-hive-2.3.7-bin/lib/

[root@hadoop003 lib]# chown hadoop:hadoop mysql-connector-java-5.1.47.jar

4.增加hive-site.xml

# vim hive-site.xml

javax.jdo.option.ConnectionURL

jdbc:mysql://hadoop002:3306/hive_metastore?createDatabaseIfNotExist=true

JDBC connect string for a JDBC metastore

javax.jdo.option.ConnectionDriverName

com.mysql.jdbc.Driver

Driver class name for a JDBC metastore

javax.jdo.option.ConnectionUserName

root

username to use against metastore database

javax.jdo.option.ConnectionPassword

KoiioK12#

password to use against metastore database

5.配置hive_home

vim /etc/profile

export HIVE_HOME=/usr/local/cluster/apache-hive-2.3.7-bin

export PATH=$PATH:$HIVE_HOME/bin

6.初始化元数据库

[hadoop@hadoop003 ~]$ schematool -dbType mysql -initSchema

7.启动hive客户端

hive

#创建测试库

hive> create database test;

8.界面查看hdfs文件

a8db6863243d61c0239cfe521e1643c2.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值