Installing the MySQL JDBC Driver for MariaDB

The MariaDB JDBC driver is not supported. Follow the steps in this section to install and use the MySQL JDBC driver instead.

Install the JDBC driver on the Cloudera Manager Server host, as well as any other hosts running services that require database access.

Cloudera recommends that you consolidate all roles that require databases on a limited number of hosts, and install the driver on those hosts. Locating all such roles on the same hosts is recommended but not required. Make sure to install the JDBC driver on each host running roles that access the database.
OS Command
  1. Download the MySQL JDBC driver from (in .tar.gz format). As of the time of writing, you can download version 5.1.46 using wget as follows:
  2. Extract the JDBC driver JAR file from the downloaded file. For example:
    tar zxvf mysql-connector-java-5.1.46.tar.gz
  3. Copy the JDBC driver, renamed, to /usr/share/java/. If the target directory does not yet exist, create it. For example:
    sudo mkdir -p /usr/share/java/
                            cd mysql-connector-java-5.1.46
                            sudo cp mysql-connector-java-5.1.46-bin.jar /usr/share/java/mysql-connector-java.jar
sudo zypper install mysql-connector-java
Ubuntu or Debian
sudo apt-get install libmysql-java