porter icon indicating copy to clipboard operation
porter copied to clipboard

如何配置从Mysql到关系数据库的同步

Open zhangkewei opened this issue 7 years ago • 0 comments

如何配置从Mysql到关系数据库的同步

以下配置文件格式适用配置管理后台"同步管理->高级任务配置(原菜单名:本地任务)->新增" 如果是本地任务配置文件需要增加前缀"porter.task[任务下标,从0开始]"

taskId=任务ID
nodeId=节点1,节点2,节点3
consumer.consumerName=CanalFetch
consumer.converter=canalRow
consumer.source.sourceType=CANAL
consumer.includes=数据库名.表名,数据库名.表名
consumer.source.filter=过滤表名正则
consumer.source.database=数据库
consumer.source.password=密码
consumer.source.address=ip:3306
consumer.source.username=用户名


loader.loaderName=JdbcBatch
loader.source.sourceType=JDBC
loader.source.dbType=可选项:MYSQL、ORACLE
loader.source.url=jdbc:mysql://127.0.0.1:3306/数据库?useUnicode=true&characterEncoding=utf8
loader.source.userName=用户名
loader.source.password=密码
loader.source.maxWait=60000
loader.source.minPoolSize=10
loader.source.maxPoolSize=50
loader.source.initialPoolSize=20
loader.source.connectionErrorRetryAttempts=3
loader.insertOnUpdateError=false

mapper[0].schema=源端schema,目标端数据库schema(mysql就是数据库名)
mapper[0].table=源表名,目标端表名
mapper[0].column.源表字段名=目标端表字段名

mapper[0].forceMatched=false

zhangkewei avatar Jan 15 '19 03:01 zhangkewei