zoukankan      html  css  js  c++  java
  • Hive安装(二)之表不见了

      重启一下电脑,发现表不见了,原来我用的derby存储hive的meta,网上找了一下资料,说是要用mysql,

    于是安装mysql

     1 sudo apt-get install mysql-server  

    首先用root登陆给root用户赋予权限

    1 $mysql -u root -p hive
    2 mysql> GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "root";

    拷贝mysql-connector-java-5.1.13.jar到hive的lib目录下

    修改hive-site.xml的metastore的配置

     1 <property>
     2 
     3    <name>hive.metastore.warehouse.dir</name>
     4 
     5    <value>/user/hive/warehouse</value>
     6 
     7 </property>
     8 
     9 <property>
    10 
    11    <name>hive.metastore.local</name >
    12 
    13    <value >true</value >
    14 
    15 </property>
    16 
    17 <property>
    18 
    19 <name>javax.jdo.option.ConnectionURL</name>
    20 
    21 <value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
    22 
    23 <description>JDBC connect string for a JDBC metastore</description>
    24 
    25 </property>
    26 
    27 <property>
    28 
    29 <name>javax.jdo.option.ConnectionDriverName</name>
    30 
    31 <value>com.mysql.jdbc.Driver</value>
    32 
    33 <description>Driver class name for a JDBC metastore</description>
    34 
    35 </property>
    36 
    37 <property>
    38 
    39   <name>javax.jdo.option.ConnectionUserName</name>
    40 
    41   <value>root</value>
    42 
    43   <description>username to use against metastore database</description>
    44 
    45 </property>
    46 
    47 <property>
    48 
    49   <name>javax.jdo.option.ConnectionPassword</name>
    50 
    51   <value>root</value>
    52 
    53   <description>password to use against metastore database</description>
    54 
    55 </property>
    View Code
  • 相关阅读:
    ImageCapOnWeb控件使用说明
    网页摄像头拍照
    js调用ocx控件
    sql中 in 、not in 、exists、not exists 用法和差别
    oracle远程登录解决办法
    oracle导入导出,包括表,表结构,方案,数据库
    字典树
    线段树
    Til the Cows Come Home
    Forgger
  • 原文地址:https://www.cnblogs.com/bigdatafly/p/5005675.html
Copyright © 2011-2022 走看看