<configuration>

      <property>
<name>hive.metastore.warehouse.dir</name>
<value>/home/local/hive-metastore-dir/warehouse</value> </property> <property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hivedb?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>user</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>password</value>
</property> </configuration>

hive执行命令:

hive

如果hive命令无法启动hive,则先进行schema的初始化

schematool -initSchema -dbType mysql

然后在执行hive命令

Hive配置文件hive-site.xml-LMLPHP

05-11 18:20