Kafka-connect-jdbc: Kafka jdbc connector: No suitable driver found for jdbc:mysql

Created on 17 Feb 2019  路  5Comments  路  Source: confluentinc/kafka-connect-jdbc

I am trying this in my mac. Trying to create jdbc source connector (confluent 5.1) and getting errors "No suitable driver..." but I do have the connector jar. I have placed mysql-connector-java-8.0.13.jar under /usr/share/java/, /usr/share/java/kafka and /usr/share/java/kafka-connect-jdbc. I also tried placing this file under /share/java/kafka-connect-jdbc/. No luck.

In the confluent directory, I execute this command:
confluent load mysql-bulk-source -d etc/kafka-connect-jdbc/source-mysql-bulk-source.properties

This is my source properties file etc/kafka-connect-jdbc/source-mysql-bulk-source.properties :
name=mysql-bulk-source
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
tasks.max=10
connection.url=jdbc:mysql:///
connection.user=xxx
connection.password=xxx
mode=bulk
topic.prefix=mysql-

And this is the error I get:
{
"error_code": 400,
"message": "Connector configuration is invalid and contains the following 2 error(s):\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql:/// for configuration Couldn't open connection to jdbc:mysql:///\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql:/// for configuration Couldn't open connection to jdbc:mysql:///\nYou can also find the above list of errors at the endpoint /{connectorType}/config/validate"
}

question

Most helpful comment

I also had this problem but I also added the mysql-connector-java-8.0.13.jar file to:
confluent-5.4.1/share/confluent-hub-components/confluentinc-kafka-connect-jdbc/lib
and it started working.

All 5 comments

@venkrishy - Did you find a fix for this? I am running into this exact issue and would like to know how you fixed it.

I also had this problem but I also added the mysql-connector-java-8.0.13.jar file to:
confluent-5.4.1/share/confluent-hub-components/confluentinc-kafka-connect-jdbc/lib
and it started working.

@lloyd-e-j-williams Worked for me too. Thanks!

I also added the
mysql-connector-java-8.0.13.jar file to:
confluent-5.4.1/share/confluent-hub-components/confluentinc-kafka-connect-jdbc/lib
but i still have the same issue. Any suppot please

Was this page helpful?
0 / 5 - 0 ratings