A question for any of you who use MySQL CDC connec...
# troubleshooting
g
A question for any of you who use MySQL CDC connector in Flink SQL: My MySQL database is a azure flexible server that requires SSL connection to read the binlog. I have written added these lines to my create table statement: create table source_table .... 'connector'='mysql-cdc', ... 'jdbc.properties.useSSL' = 'true', 'jdbc.properties.sslMode' = 'REQUIRED' When I run SELECT * FROM source_table I see a screen that shows rows of data and then this error: [ERROR] Could not execute SQL statement. Reason: com.github.shyiko.mysql.binlog.network.AuthenticationException: Connections using insecure transport are prohibited while --require_secure_transport=ON. Are there additonal JDBC properties I need to set?
looking at https://debezium.io/documentation/reference/stable/connectors/mysql.html#mysql-property-database-ssl-mode you could try setting
'debezium.database.ssl.mode' = 'required'
maybe?
g
I am using Flink SQL Connector MySQL CDC 3.3.0 - flink-sql-connector-mysql-cdc-3.3.0.jar and included MySQL JDBC Driver 8.0.27 - mysql-connector-java-8.0.27.jar
@rmoff - setting 'debezium.database.ssl.mode' = 'required' worked. While I admit I am not a Java developer, I would have figured the rest of the required properties that was passed down to that level would ahve included ssl mode but guess not. Thank you for your assistance.
👍 1
b
@Guy Swartwood where should I set ‘debezium.database.ssl.mode’ = ‘required’ ?
seems to work:
Copy code
source:
  type: mysql
  hostname: proxysql
  port: 6033
  username: bentzi.m
  password: XXX
  tables: manager.orders
  server-id: XXX
  server-time-zone: UTC
  debezium.database.ssl.mode: REQUIRED
is that the correct place?
g
@Bentzi Mor My work was in Flink SQL so I added this to table definition like: CREATE TABLE mytable ( id int primary key not enforced, name string ) WITH ( 'connector'='mysql-cdc', 'hostname'='<http://weavix-cc-prod-mysql.mysql.database.azure.com|<>excluded>', 'port'='3306', 'server-id'='5400', 'username'='<excluded>', 'password'='<Mysql password>', 'database-name'='mydb', 'table-name'='mytable', 'jdbc.properties.useSSL' = 'true', 'jdbc.properties.sslMode' = 'required', 'debezium.database.ssl.mode' = 'required' );
b
thanks
In this configuration every time source table is altered you need to update this configuration does it support for schema evolution?
g
I don't believe so, but I am not an expert. The only thing I have seen in terms of supporting schema migrations out of the box is CDC pipelines (https://nightlies.apache.org/flink/flink-cdc-docs-release-3.3/docs/core-concept/schema-evolution/) and I am not using a pipeline.
b
yes , I am playing with that
g
Very nice. You are in a realm that I am not in because there was no out of the box CDC pipeline that supports MySQL as a source and PostgreSQL as a sink.