2014-01-30 94 views
1

Hive Metastore未創建MYSQL或Derby Connection。Hive Metastore未創建MYSQL或Derby Connection

德比

schematool -dbType derby -initSchema 
Metastore connection URL: jdbc:mysql://localhost/metastore 
Metastore Connection Driver : com.mysql.jdbc.Driver 
Metastore connection User: hive 

schematool -dbType derby -info 
Metastore connection URL: jdbc:mysql://localhost/metastore 
Metastore Connection Driver : com.mysql.jdbc.Driver 
Metastore connection User: hive 
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to load driver 
*** schemaTool failed *** 

對於MySQL

schematool -dbType mysql -initSchema 
Metastore connection URL: jdbc:mysql://localhost/metastore 
Metastore Connection Driver : com.mysql.jdbc.Driver 
Metastore connection User: hive 
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to load driver 
*** schemaTool failed *** 

schematool -dbType mysql -info 
Metastore connection URL: jdbc:mysql://localhost/metastore 
Metastore Connection Driver : com.mysql.jdbc.Driver 
Metastore connection User: hive 
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to load driver 
*** schemaTool failed *** 

問題是什麼。

我正在運行Hive 0.12.0

+0

DownVoters請評論 –

+0

我有同樣的問題0.14.0。 schematool忽略了hive-site.xml中的配置 – RanP

+0

找到了解決方案,可否請幫助? –

回答

1

我認爲問題出在您的網址上。修改URL如下。把MySQL的端口號。

Metastore連接網址:jdbc:mysql://localhost:3306/metastore

+0

我想從非常長的時間配置mysql與蜂巢,每次我遇到錯誤,我不明白我要去哪裏錯誤.....你可以看到在這個鏈接https://gist.github。 COM /匿名/ bb86629116891e5b2d8c30b95aca9aee 蜂房site.xml的配置在這裏可以看到在鏈接https://gist.github.com/anonymous/44f1c9fc214136a113067cf3b4b72794 這裏是文件結構 https://gist.github.com /匿名/ e02b3631da940dfae880252ca72107de –

1

如果您要訪問德比,我懷疑這些應該是這樣的:的

Metastore connection URL: jdbc:mysql://localhost/metastore 
Metastore Connection Driver : com.mysql.jdbc.Driver 
+0

在哪裏改變這些?我正在使用0.12.0。我只是提取包裝。我應該創建額外的任何文件?像hive -site –

1

Metastore connection URL: jdbc:derby://localhost:1527/metastore 
Metastore Connection Driver : org.apache.derby.jdbc.ClientDriver 

,而不是失敗的此特定錯誤「加載驅動程序「,您應該檢查是否已複製mysql連接器或Hive lib文件夾中有鏈接。

LN -s /usr/share/java/mysql-connector-java.jar $ HIVE_HOME/lib中/ MySQL的連接器,java.jar

(下載它,如果你沒有在Java中有它libs)

同樣也得到德比的lib。

0

錯誤信息非常廣泛。要獲得根本原因的更多信息,schematool支持-verbose標誌:

schematool -dbType derby -initSchema -verbose 

這將打印完整的堆棧跟蹤,這在我的案件中標識丟失的數據庫:

產生的原因:com.mysql .jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 未知數據庫 'metastore'

相關問題