Reply
Contributor
Posts: 48
Registered: ‎05-30-2015
Accepted Solution

couldn't find /usr/lib/hive/lib for mysql connector jar file

Dear all,

 

I installed cloudera 5.11 using Path A installation with Hive and sparks, I am trying to set up external database by following the guide for metastore external database setup, however I couldn't find the path to store the mysql connector jar file, has anyone face the same issue before?

 

https://www.cloudera.com/documentation/enterprise/5-8-x/topics/cdh_ig_hive_metastore_configure.html

 

Posts: 519
Topics: 14
Kudos: 91
Solutions: 45
Registered: ‎09-02-2016

Re: couldn't find /usr/lib/hive/lib for mysql connector jar file

@yongie

 

The default path to store mysql connector is /usr/share/java/

Contributor
Posts: 48
Registered: ‎05-30-2015

Re: couldn't find /usr/lib/hive/lib for mysql connector jar file

I have found the mysql connector jar file under /usr/share/java but /usr/lib/hive/lib doesn't seem to be in the system.

Champion
Posts: 761
Registered: ‎05-16-2016

Re: couldn't find /usr/lib/hive/lib for mysql connector jar file

[ Edited ]

 

You can create a soft link for connector in the hive library directory 

 

ln -s /usr/share/java/mysql-connector-java.jar $HIVE_HOME/lib/mysql-connector-java.jar

or 

 

copy the connector jar to the Hive lib  folder 

 

 

 

 

Contributor
Posts: 48
Registered: ‎05-30-2015

Re: couldn't find /usr/lib/hive/lib for mysql connector jar file

I think I found the folder in Ubuntu, it is under /usr/share/cmf/common_jars, the mysql-connector-java-5.1.15.jar is there already.

 

Champion
Posts: 761
Registered: ‎05-16-2016

Re: couldn't find /usr/lib/hive/lib for mysql connector jar file

[ Edited ]

Yes it comes by default APT package   5.5 and 5.6 version 

I heard there are some issue with 5.5 OS comptability I might be wrong but upgrade to 5.6 if you want 

 

*** Removing the old 
sudo apt-get purge mysql-server-5.5 mysql-client-5.5
 
sudo apt-get autoremove


*** Installing the new 
 sudo apt-get install mysql-server-5.6 mysql-client-5.6

 

 

Contributor
Posts: 48
Registered: ‎05-30-2015

Re: couldn't find /usr/lib/hive/lib for mysql connector jar file

Thanks for the information, will upgrade as soon as possible, at the mean time I am still exploring how to get external DB done on hive, oozie and those monitoring DB
Highlighted
Champion
Posts: 761
Registered: ‎05-16-2016

Re: couldn't find /usr/lib/hive/lib for mysql connector jar file

"I am still exploring how to get external DB done on hive, oozie and those monitoring DB "

 

Can you please elborate more sorry , I can certainly give you more information.

Announcements