Installing JDBC Driver

You must install the required JDBC driver.

Loading Filters ...

Download, extract, and copy the renamed JDBC driver, to /usr/share/java/. If the target directory does not yet exist, you must create the directory.

Installing the Postgres JDBC Driver

  1. Install the PostgreSQL JDBC driver. If you would like to use the PostgreSQL JDBC driver version shipped with the OS repositories, run the following command:
    yum install postgresql-jdbc*

    You can also download the JDBC driver from the official PostgreSQL JDBC Driver website – https://jdbc.postgresql.org.

  2. Rename the Postgres JDBC driver .jar file to postgresql-connector-java.jarand copy it to the /usr/share/java directory. The following copy command can be used if the Postgres JDBC driver .jar file is installed from the OS repositories:
    cp /usr/share/java/postgresql-jdbc.jar /usr/share/java/postgresql-connector-java.jar
  3. Confirm that the .jar file is in the Java share directory:
    ls /usr/share/java/postgresql-connector-java.jar
  4. Change the access mode of the .jar file to 644:
    chmod 644 /usr/share/java/postgresql-connector-java.jar

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
RHEL
  1. Download the MySQL JDBC driver from http://www.mysql.com/downloads/connector/j/5.1.html (in .tar.gz format). As of the time of writing, you can download version 5.1.46 using wget as follows:
    wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz
  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
SLES
sudo zypper install mysql-connector-java
Ubuntu or Debian
sudo apt-get install libmysql-java

Installing the MySQL JDBC Driver

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
RHEL
  1. Download the MySQL JDBC driver from http://www.mysql.com/downloads/connector/j/5.1.html (in .tar.gz format). As of the time of writing, you can download version 5.1.46 using wget as follows:
    wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz
  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
SLES
sudo zypper install mysql-connector-java
Ubuntu
sudo apt-get install libmysql-java

Installing the Oracle JDBC Connector

You must install the JDBC connector on the Cloudera Manager Server host and any other hosts that use a database.

  1. Download the Oracle JDBC Driver from the Oracle website. For example, the version 6 JAR file is named ojdbc6.jar.

    For more information about supported Java versions, see Java Requirements.

    To download the JDBC driver, visit the Oracle JDBC and UCP Downloads page, and click on the link for your Oracle Database version. Download the ojdbc6.jar file (or ojdbc8.jar, for Oracle Database 12.2).

  2. Copy the Oracle JDBC JAR file to /usr/share/java/oracle-connector-java.jar. The Cloudera Manager databases and the Hive Mestastore database use this shared file. For example:
    sudo mkdir -p /usr/share/java
                            sudo cp /tmp/ojdbc8-12.2.0.1.jar /usr/share/java/oracle-connector-java.jar
                            sudo chmod 644 /usr/share/java/oracle-connector-java.jar