I am trying to connect MySQL DB (installed in my laptop) from Confluent Cloud Remote access using MySQL Source connector. I am not able to establish the connection with MySQL Connector.
Error: Unable to validate configuration. If an update was made to the configuration, this means that the configuration was invalid, and the connector continues to operate on a previous configuration that passed validation. Errors:
connection.password: Could not connect to database
table.whitelist: Unable to check whether table(s) exist due to connection error
The same JDBC connection works via a Java program on my laptop.
Sample program I used:
try {
// connect way #1
String url1 = "jdbc:mysql://192.168.2**.**:3306/test_kafka_connectors";
String user = "Adhi";
String password = "*****";
conn1 = DriverManager.getConnection(url1, user, password);
if (conn1 != null) {
System.out.println("Connected to the database test1");
}
The hostname (localhost with port 3306 or 192.168.2**.**:3306 (my laptop IP address) works fine in the Java program.
With Confluent connector, I am not able to establish the connection. Steps which I have done below
Step 1. I have added the connection string details and username and password inside the connector.
Authentication
Connection host\
192.168.2**.2**
Connection port
3306
Connection user
Adhi
Connection password
****************
Database name
test_kafka_connectors
SSL mode
prefer
Step 2. Created the user (Adhi with IP address of Confluent) and granted the permission in MySQL below. Please refer db user image.
Step 3: I tried to place the bind address property of Confluent IP address in MySQL conf file mysqlrouter.conf and restarted the mysql service, but still the Connector connection is not working.