Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar
Super 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

avatar
Master 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

View solution in original post

2 REPLIES 2

avatar

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.

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Master 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