开发者社区 > 大数据与机器学习 > 实时计算 Flink > 正文

flinkcdc3.0 支持 mysql到mysql同步吗

flink cdc3.0 mysql到mysql同步报错
Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "mysql" in the classpath.

Available factory classes are:

com.ververica.cdc.connectors.doris.factory.DorisDataSinkFactory
com.ververica.cdc.connectors.mysql.factory.MySqlDataSourceFactory
at com.ververica.cdc.composer.utils.FactoryDiscoveryUtils.getFactoryByIdentifier(FactoryDiscoveryUtils.java:60)
at com.ververica.cdc.composer.flink.FlinkPipelineComposer.createDataSink(FlinkPipelineComposer.java:144)
at com.ververica.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:108)
at com.ververica.cdc.cli.CliExecutor.run(CliExecutor.java:65)
at com.ververica.cdc.cli.CliFrontend.main(CliFrontend.java:62)


配置文件

source:
type: mysql
hostname: 127.0.0.1
port: 3306
username: a
password: b
tables: demo1.t1

server-id: 5400-5404

server-time-zone: Asia/Shanghai

sink:
type: mysql
hostname: 127.0.0.1
port: 3306
username: a
password: b
server-time-zone: Asia/Shanghai

pipeline:
name: mysql2mysql
parallelism: 1

route:

  • source-table: demo1.t1
    sink-table: demo2.t1

展开
收起
dyyx007 2024-08-12 10:04:09 43 0
1 条回答
写回答
取消 提交回答
  • image.png
    从报错看你是不是没有添加

    <dependency>
    <groupId>com.ververica</groupId>
        <artifactId>flink-connector-cdc-mysql_2.12</artifactId>
        <version>3.0.0</version>
    </dependency>
    

    这个依赖啊

    2024-08-12 10:46:19
    赞同 6 展开评论 打赏

实时计算Flink版是阿里云提供的全托管Serverless Flink云服务,基于 Apache Flink 构建的企业级、高性能实时大数据处理系统。提供全托管版 Flink 集群和引擎,提高作业开发运维效率。

相关电子书

更多
One Box: 解读事务与分析一体化数据库 HybridDB for MySQL 立即下载
One Box:解读事务与分析一体化数据库HybridDB for MySQL 立即下载
如何支撑HTAP场景-HybridDB for MySQL系统架构和技术演进 立即下载

相关镜像