hive 1.2 整合 mysql_Hive1.2.x搭建步骤及爬坑指南

CentOS7默认使用的MySQL分支 MariaDB

#yum -y install mariadb*

#mysqladmin -uroot password hadoop

#systemctl start mariadb

#systemctl enable mariadb //开机自启

#mysql -uroot -phadoop

mysql> grant all on *.* to 'root'@'%' identified by 'hadoop';

mysql>flush privileges;

mysql>exit8、安装MySQL连接工具

这里使用的rpm方式安装

Master端:

#wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-8.0.11-1.el7.noarch.rpm

//从MySQL官网下载

//mysql-connector-java 依赖java-headless

#yum -y install java-headless

#rpm -ivh mysql-connector-java-8.0.111-.el7.noarch.rpm复制链接库文件#rpm -ql mysql-connector-java

924930b2cc98bf58154c54987bd79585.png

将jar包拷贝到hive的lib下

#cp /usr/share/java/mysql-connector-java-8.0.11.jar /hadoop/hive/lib/

9、拷贝安装包

将Master端配置好的hive拷贝到2个slave节点

scp -r /usr/local/src/apache-hive-1.2.2-bin root@slave1:/usr/local/src/apache-hive-1.2.2-bin

scp -r /usr/local/src/apache-hive-1.2.2-bin root@slave2:/usr/local/src/apache-hive-1.2.2-bin

10、启动hive#/hadoop/hive/bin/hive

f9dd66198bd7c90332730f267c9b63d4.png

11、测试hive> create database test_for_hive;

OK

Time taken: 1.243 seconds

hive> show databases;

OK

default

hice_test

hive_test2

test_for_hive

Time taken: 1.3 seconds, Fetched: 4 row(s)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值