DataLinkDC / dinky

Dinky is a real-time data development platform based on Apache Flink, enabling agile data development, deployment and operation.
http://www.dinky.org.cn
Apache License 2.0
3.15k stars 1.16k forks source link

Synchronization of mysql-mysql using version 1.1.0 of the entire database failed #3694

Closed tongwang02 closed 3 months ago

tongwang02 commented 3 months ago

Search before asking

What happened

FLINK版本1.17.2 FlinkSQL如下: EXECUTE CDCSOURCE cdc_mysql WITH ( 'connector' = 'mysql-cdc', 'hostname' = '127.0.0.1', 'port' = '3306', 'username' = 'root', 'password' = '123456', 'checkpoint' = '3000', 'scan.startup.mode' = 'initial', 'parallelism' = '1', 'table-name' = 'test..*', 'sink.connector' = 'jdbc', 'sink.url' = 'jdbc:mysql://127.0.0.1:3306?allowPublicKeyRetrieval=true&characterEncoding=utf-8&useSSL=false', 'sink.username' = 'root', 'sink.password' = '123456', 'sink.sink.db' = 'test1', 'sink.table.lower' = 'true', 'sink.table-name' = '#{tableName}', 'sink.driver' = 'com.mysql.cj.jdbc.Driver', 'sink.sink.buffer-flush.interval' = '2s', 'sink.sink.buffer-flush.max-rows' = '100', 'sink.sink.max-retries' = '5', 'sink.auto.create' = 'true' )

Dinky console显示: CREATE TABLE IF NOT EXISTS test_t2 ( id STRING ,name STRING ,PRIMARY KEY ( id ) NOT ENFORCED ) WITH ( 'password' = '123456', 'connector' = 'jdbc', 'driver' = 'com.mysql.cj.jdbc.Driver', 'sink.max-retries' = '5', 'sink.buffer-flush.interval' = '2s', 'sink.buffer-flush.max-rows' = '100', 'table-name' = 'test_t2', 'url' = 'jdbc:mysql://127.0.0.1:3306?allowPublicKeyRetrieval=true&characterEncoding=utf-8&useSSL=false/test1', 'username' = 'root')

其中url一栏 最后将sink.sink.db的名字拼在后面导致flinksql失败,无法同步

What you expected to happen

可以正常同步数据

How to reproduce

使用官方文档MYSQLCDC整库到MYSQL即可复现

Anything else

No response

Version

dev

Are you willing to submit PR?

Code of Conduct

aiwenmo commented 3 months ago

https://www.dinky.org.cn/docs/1.1/practical_guide/cdcsource_practice/cdcsource_mysqlcdc2mysql