4-安装mariadb

①yum install mariadb-server mariadb

    systemctl start mariadb   #启动MariaDB

    systemctl stop mariadb   #停止MariaDB

    systemctl restart mariadb   #重启MariaDB

    systemctl enable mariadb   #设置开机启动

②进入:mysql -u root -p


  1、use mysql -uroot; //不输入密码
  2、use mysql
  3、update user set password=PASSWORD('root') where user='root'; //设置root的密码
  4、update user set host='%' where host='127.0.0.1'; //允许其他人用root登录
  5、flush privileges;

③更改配置文件hive-site.xml

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
     <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> 
     <configuration>   
 
         <property>     
             <name>hive.metastore.warehouse.dir</name>   
             <value>/user/hive/warehouse</value>    
             <description>location of default database for the warehouse</description> 
         </property>  
 
         <property>     
             <name>hive.cli.print.current.db</name>   
             <value>true</value>    
             <description>Whether to include the current database in the Hive prompt.</description>  
         </property>  
 
         <property>     
             <name>hive.cli.print.header</name> 
             <value>true</value>    
             <description>Whether to print the names of the columns in query output.</description>  
         </property>      
         <property>     
             <name>javax.jdo.option.ConnectionURL</name>    
             <value>jdbc:mysql://192.168.40.10:3306/metastore?createDatabaseIfNotExist=true</value>  
         </property>    
 
         <property>     
             <name>javax.jdo.option.ConnectionDriverName</name>  
             <value>com.mysql.jdbc.Driver</value>   
         </property>     
         <property>
                <name>javax.jdo.option.ConnectionUserName</name>
                <value>root</value>
          </property>
  
          <property>
                <name>javax.jdo.option.ConnectionPassword</name>
                <value>root</value>
          </property>

      </configuration>        

④启动hive之后,再进入mysql -uroot -proot ,如能出现metastore数据库,则表示成功

转载于:https://www.cnblogs.com/lihaozong2013/p/10619143.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值