HIVE1.2.1配置

HIVE1.2.1配置,第1张

HIVE1.2.1配置 hive配置

cp /opt/module/apache-hive-1.2.1-bin/hive-env.sh.template /opt/module/apache-hive-1.2.1-bin/hive-env.sh

vim cp /opt/module/apache-hive-1.2.1-bin/hive-env.sh
export HADOOP_HOME=/opt/module/hadoop-2.7.7
export HIVE_CONF_DIR=/opt/module/apache-hive-1.2.1-bin/conf
在hdfs建立hive仓库目录

hadoop fs -mkdir /tmp
hadoop fs -mkdir -p /user/hive/warehouse

启动单例hive

/opt/module/apache-hive-1.2.1-bin/bin/hive

测试
create table student(id int ,name string);
show tables;

insert into table student values(1,'zs');
配置 mysql5.6
#进入MySQL,设置初始密码,括号内就是密码,可以根据你的需要进行设置
set password = password('000000');

#开启root用户的远程登录权限 和远程登录密码(就是这里的000000)
grant all privileges on *.* to 'root'@'%' identified by '000000' with grant option;
flush privileges;

select Host, user from user;
编辑hive-site.xml使用MySQL做元数据管理



    
        javax.jdo.option.ConnectionURL
        jdbc:mysql://node01:3306/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
        
        000000
        password to use against metastore database
    

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5154207.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-18
下一篇 2022-11-18

发表评论

登录后才能评论

评论列表(0条)

保存