Installing the MySQL JDBC connector
- Download the MySQL JDBC Driver from the MySQL website.
- Extract the JDBC driver JAR file from the downloaded file with the following
command:
tar zxvf mysql-connector-java-8.0.27.tar.gz
- Rename the JDBC jar file to
mysql-connector-java.jar
.mv mysql-connector-java-8.0.27-bin.jar mysql-connector-java.jar
- Copy the MySQL JDBC jar file to your host.This host must be the same host where you plan to assign the Streaming SQL Engine service role. The service roles are assigned as a next step when installing Cloudera SQL Stream Builder as a service in Cloudera Manager.
scp <location>/mysql-connector-java.jar root@<your_hostname>:
You will be prompted to provide your password. - Access the host on your cluster.This host must be the same host where you have added the JDBC jar file.
ssh root@<your_hostname>
You will be prompted to provide your password. - Copy the MySQL JDBC jar file to
/usr/share/java
folder using the following command.sudo mkdir -p /usr/share/java sudo cp <location>/mysql-connector-java.jar /usr/share/java
- Check if the MySQL connector is in the folder with
ls
command.