Setting up the Debezium MySQL Source connector
Learn about the CDP specific setup steps required before you can deploy the Debezium MySQL Source connector.
In CDP, before deploying an instance of the Debezium MySQL Source connector, you must download and deploy the MySQL JDBC driver on all Kafka Connect hosts. Otherwise, you will not be able to deploy the connector. The following list of steps walks you through this process.
For more information regarding how the Debezium MySQL connector works as well as its configuration and properties, see the Debezium connector for MySQL in the Debezium documentation.
- Download the MySQL JDBC driver. The JDBC driver can be downloaded from the MySQL Community Downloads page. Download the platform independent version. Cloudera recommends that you use version 8.0.27.
- Extract the files from the downloaded archive. You can use the tar command or any other archive manager to extract the archive. For example:
tar -xf mysql-connector-java-[***VERSION***].tar.gz
- Navigate to the directory where the driver was extracted.
- Copy and rename the driver to the location specified in the JDBC Driver
Jars Path For Debezium Kafka property. The default location is
/var/lib/kafka_connect_jdbc. The JDBC driver must be renamed to
mysql-connector-java.jar. For example:
cp ./mysql-connector-java-[***VERSION***].jar /var/lib/kafka_connect_jdbc/mysql-connector-java.jar
- Set correct file permissions. For example:
chmod 644 /var/lib/kafka_connect_jdbc/mysql-connector-java.jar