Hive Metastore is not creating MYSQL or Derby Connection.
For Derby
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 ***
For 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 ***
What is the issue .
I am running Hive 0.12.0
The error message is very broad. To get more information on the root cause, schematool supports the
-verbose
flag:This will print the full stacktrace, which in my case indentified the missing database:
If you want to access Derby, I suspect these should be something like:
instead of
For this specific error "Failed to load driver", you should check if you have the mysql connector copied or has a link in Hive lib folder.
ln -s /usr/share/java/mysql-connector-java.jar $HIVE_HOME/lib/mysql-connector-java.jar
(Download it if you don't have it within the Java libs)
Similarly get the lib for Derby too.
I think the problem is with your URL. Modify the URL as follows. Put the mysql port no.
Metastore connection URL:
jdbc:mysql://localhost:3306/metastore