[ 
https://issues.apache.org/jira/browse/HIVE-16800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16042352#comment-16042352
 ] 

Bing Li commented on HIVE-16800:
--------------------------------

Hi, Vigneshwaran
I think the document you referred to is out-of-date.

Please try the following steps in your cluster (using the commands for RHEL as 
an example):
1. Install MySQL
yum -y install mysql-server mysql mysql-devel

2. Start MySQL
/etc/init.d/mysqld start

3. Link or copy mysql-connector-java.jar to hive/lib

4. Set configurations in hive-site.xml
javax.jdo.option.ConnectionDriverName=com.mysql.jdbc.Driver
javax.jdo.option.ConnectionURL=jdbc:mysql://myhost.com/hive?createDatabaseIfNotExist=true
javax.jdo.option.ConnectionUserName=APP
javax.jdo.option.ConnectionPassword=mine

5. Prepare database for HiveMetastore in MySQL
mysql>create database hive;
mysql> grant all on hive.* to 'APP'@'myhost.com' identified by 'mine';

6. Verification on MySQL
mysql -u APP -h myhost.com -p
Type with "mine" as the password

7. Run Hive SchemaTool
hive/bin/schematool -dbType mysql -initSchema

8. Start HiveMetastore
hive/bin/hive --service metastore

> Hive Metastore configuration with Mysql
> ---------------------------------------
>
>                 Key: HIVE-16800
>                 URL: https://issues.apache.org/jira/browse/HIVE-16800
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: Vigneshwaran
>            Assignee: Bing Li
>
> I'm trying to configure MySql as metastore in Hive 1.2.2 by following the 
> link https://dzone.com/articles/how-configure-mysql-metastore, but when I'm 
> trying to run hive after all the step I'm getting the below errors:
> Exception in thread "main" java.lang.RuntimeException: 
> java.lang.RuntimeException: Unable to instantiate 
> org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
> Caused by: java.lang.RuntimeException: Unable to instantiate 
> org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
> at 
> org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1523)
> Caused by: java.lang.reflect.InvocationTargetException
> Caused by: javax.jdo.JDOFatalUserException: Exception thrown setting 
> persistence propertiesNestedThrowables:



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to