-
在MySQL中赋权,首先进入mysql中
grant all privileges on . to ‘root’@‘hadoop01’ identified by ‘root’ with grant option;
(注意:hadoop01是指第一台云主机的主机名,可以换成自己的云主机名称)
grant all on . to ‘root’@’%’ identified by ‘root’;
flush privileges; -
在MySQL中为Hive存储元数据创建数据库
create database hive character set latin1; -
进入Hive安装目录的子目录conf下
cd /home/software/apache-hive-1.2.0-bin/conf -
编辑
vim hive-site.xml
添加
javax.jdo.option.ConnectionURL
jdbc:mysql://hadoop01:3306/hive?createDatabaseIfNotExist=true
javax.jdo.option.ConnectionDriverName
com.mysql.jdbc.Driver
javax.jdo.option.ConnectionUserName
root
javax.jdo.option.ConnectionPassword
root
-
进入子目录lib下,下载MySQL的驱动jar包
cd …/lib
wget http://bj-yzjd.ufile.cn-north-02.ucloud.cn/mysql-connector-java-5.1.38-bin.jar -
回到bin目录下,启动Hive
cd …/bin
sh hive
Hive元数据的修改(finalshell中)
最新推荐文章于 2024-07-18 22:48:29 发布