码迷,mamicode.com
首页 > 其他好文 > 详细

Hive安装(二)之表不见了

时间:2015-11-29 22:53:03      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:

  重启一下电脑,发现表不见了,原来我用的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

 

Hive安装(二)之表不见了

标签:

原文地址:http://www.cnblogs.com/bigdatafly/p/5005675.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!