Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

which version of mysql-connector-java to use with HDP3.1 ?

Solved Go to solution

which version of mysql-connector-java to use with HDP3.1 ?

Master Collaborator

In installing hive if I use the driver that came with HDP the DB connection test fails , but if I use the older driver I have(don't know the version) the check succeeds .


[root@hadoop1 resources]# pwd
/var/lib/ambari-server/resources
[root@hadoop1 resources]# ls -al mysql-connector-java.jar
lrwxrwxrwx. 1 root root 64 May 22 14:56 mysql-connector-java.jar -> /var/lib/ambari-server/resources/mysql-connector-java-8.0.15.jar
[root@hadoop1 resources]#

1 ACCEPTED SOLUTION

Accepted Solutions

Re: which version of mysql-connector-java to use with HDP3.1 ?

Mentor

@Sami Ahmad

When you have set up your ambari.repo correctly on Linux you need to do the following

# yum repolist
# yum install -y  ambari-server
# yum install -y mysql-connector-java
# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java

That should pick the correct version of MySQL driver for your ambari if you indeed to run on MySQL or MariaDB

# yum install -y mariadb-server

To get the mysql-connect version here are the steps

# zipgrep 'Bundle-Version' mysql-connector-java.jar

output

META-INF/MANIFEST.MF:Bundle-Version: 5.1.25

HTH

2 REPLIES 2

Re: which version of mysql-connector-java to use with HDP3.1 ?

Community Manager

The above was originally posted in the Community Help Track. On Wed May 22 19:57 UTC 2019, a member of the HCC moderation staff moved it to the Data Processing track. The Community Help Track is intended for questions about using the HCC site itself.

Re: which version of mysql-connector-java to use with HDP3.1 ?

Mentor

@Sami Ahmad

When you have set up your ambari.repo correctly on Linux you need to do the following

# yum repolist
# yum install -y  ambari-server
# yum install -y mysql-connector-java
# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java

That should pick the correct version of MySQL driver for your ambari if you indeed to run on MySQL or MariaDB

# yum install -y mariadb-server

To get the mysql-connect version here are the steps

# zipgrep 'Bundle-Version' mysql-connector-java.jar

output

META-INF/MANIFEST.MF:Bundle-Version: 5.1.25

HTH