hive配置mysql元数据

1.mysql数据库操作

建立hive数据库:

create database hive
添加用户及用户权限:

grant all privileges on *.* to 'hive'@'hdp001' identified by 'hive123'; 
flush privileges;

2.hive-site.xml配置

 
  
    
        hive.metastore.local
        true
    
    
        javax.jdo.option.ConnectionURL
        jdbc:mysql://192.168.35.13:3306/hive?characterEncoding=UTF-8
    
    
        javax.jdo.option.ConnectionDriverName
        com.mysql.jdbc.Driver
    
    
        javax.jdo.option.ConnectionUserName
        hive
    
    
        javax.jdo.option.ConnectionPassword
        mysql
    


 
  

3.将mysql的jar包放入$HIVE_HOME/lib下













=====================================================================

你可能感兴趣的:(hive配置mysql元数据)