本帖最后由 pig2 于 2015-8-11 07:18 编辑
hadoop 2.6 64位
apache-hive-1.0.1-bin.tar.gz
mysql-connector-java-5.1.36-bin.jar
配置文件
[mw_shl_code=actionscript3,true]<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
<description>username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>root</value>
<description>password to use against metastore database</description>
</property>
</configuration>
[/mw_shl_code]
hive> show databases;
OK
default
hivedb
kk
Time taken: 0.474 seconds, Fetched: 3 row(s)
hive> create table t123(id int,name string);
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.)
hive>
|