0

I have confluent platform on my local machine i am just trying to read the data from aws ec2 instance i have credentials like hostname, DB name, pwd etc. I am using JDBC source connector. connector config is

name=test
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector 
connection.url=jdbc:mysql://ab.bca.bdc.aaa:abcd/DB?user=abc&password=bca
table.whitelist=ppp
mode=incrementing

after running connect standalone got error like

Invalid value java.sql.SQLNonTransientConnectionException: Cannot load connection class because of underlying exception: com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
DP0808
  • 33
  • 1
  • 6
  • Try using another JDBC tool with that exact same connection string... `Malformed database URL` is not a Kafka Connect problem – OneCricketeer Nov 02 '18 at 14:22
  • could you elaborate i didn't understand. using mysql connector version 8. – DP0808 Nov 03 '18 at 05:13
  • I'm not talking about the version. The error very clearly states that the URL is malformed, which is not a problem that can be fixed alone by Kafka Connect. If you copied the exact same URL into some other Java code that uses JDBC, you should expect to see the same errors, which is what I'm asking you to try – OneCricketeer Nov 03 '18 at 05:22

1 Answers1

0

According to the JDBC MySQL syntax, user and password go before the database address as colon separated, not after

user:password@host_or_host_sublist

Not sure if using RDS or your own EC2 database would change the syntax of that

If you want to capture all database events, though, Debezium (your old question) would be what you want. Using the JDBC connector won't capture deletes (or events created and deleted between polls) and puts unnecessary strain on your database

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245