配置Hive,采用mysql存储metadata

1.安装hadoop(1.0以上)

2.安装hive安装(0.9.0以上版本)

4.当然你还得安装jdk

4. mysql,同时准备个可访问的账号,这里采用root,最好配上远程访问权限。

修改hive下的conf文件夹中将hive-default.xml.template 复制并改名成hive-site.xml

这里是我的文件

<property>
<wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;name&gt;hive.metastore.local&lt;/name&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;value&gt;true&lt;/value&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;name&gt;javax.jdo.option.ConnectionURL&lt;/name&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;value&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><span style="background-color:rgb(255,0,0)"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px">jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist</span></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="background-color:rgb(255,0,0)"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px">=true</span></span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/value&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;name&gt;javax.jdo.option.ConnectionDriverName&lt;/name&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><span style="background-color:rgb(255,0,0)"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px">&lt;value&gt;com.mysql.jdbc.Driver&lt;/value&gt;</span></span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;name&gt;javax.jdo.option.ConnectionUserName&lt;/name&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><span style="background-color:rgb(255,0,0)"><span style="color:#000000"><span style="font-family:simsun; font-size:14px; text-align:left; line-height:21px">&lt;value&gt;Username&lt;/value&gt;&lt;!-- In my case UserName is hadoop--&gt;</span></span></span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;name&gt;javax.jdo.option.ConnectionPassword&lt;/name&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><span style="background-color:rgb(255,0,0)"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px">&lt;value&gt;UserPassword&lt;/value&gt;&lt;!-- In my case password is hadoop--&gt;</span></span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/property&gt;</span></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>

其中标红的都是需要修改的,并改成自己的设置,同时将mysql的jdbc驱动拷贝到hive的lib目录下,然后启动hive看到如下界面

 
  1. WARNING:org.apache.hadoop.metrics.jvm.EventCounterisdeprecated.Pleaseuseorg.apache.hadoop.log.metrics.EventCounterinallthelog4j.propertiesfiles.
  2. Logginginitializedusingconfigurationinjar:file:/usr/local/hadoop/hive/lib/hive-common-0.9.0.jar!/hive-log4j.properties
  3. Hivehistoryfile=/tmp/root/hive_job_log_root_201206141444_1788273672.txt
  4. hive>
当输入 show tables;没有报错时,证明配置成功
hive> show tables;
OK
invites
Time taken: 3.688 seconds
hive>
然后大家可以登录到mysql查看是否创建了数据库hive(跟你配置的名字相同)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hive |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.00 sec)
这时一切搞定~~~~~~~~~~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值