Fetch the repository succeeded.
DBSyncer是一款开源的数据同步中间件,提供Mysql、Oracle、SqlServer、PostgreSQL、Elasticsearch(ES)、Kafka、File、SQL(Mysql/Oracle/SqlServer/PostgreSQL)等同步场景。支持上传插件自定义同步转换业务,提供监控全量和增量数据统计图、应用性能预警等。
特点
连接器 | 数据源 | 目标源 | 支持版本(包含以下) |
Mysql | ✔ | ✔ | 5.7.19以上 |
Oracle | ✔ | ✔ | 10g以上 |
SqlServer | ✔ | ✔ | 2008以上 |
PostgreSQL | ✔ | ✔ | 9.5.25以上 |
ES | ✔ | ✔ | 6.0以上 |
Kafka | 开发中 | ✔ | 2.10-0.9.0.0以上 |
File | ✔ | ✔ | *.txt, *.unl |
SQL | ✔ | 支持以上关系型数据库 | |
后期计划 | Redis |
修改my.ini文件,重启服务
#服务唯一ID
server_id=1
log-bin=mysql_bin
binlog-format=ROW
max_binlog_cache_size = 256M
max_binlog_size = 512M
expire_logs_days = 7
#监听同步的库, 多个库使用英文逗号“,”拼接
replicate-do-db=test
授予账号监听权限, 同时要求目标源表必须定义一个长度为18的varchar字段,通过接收rowid值实现增删改操作。
grant change notification to 你的账号
要求2008版本以上, 启动代理服务(Agent服务), 连接账号具有 sysadmin 固定服务器角色或 db_owner 固定数据库角色的成员身份。对于所有其他用户,具有源表SELECT 权限;如果已定义捕获实例的访问控制角色,则还要求具有该数据库角色的成员身份。
修改postgresql.conf文件,重启服务
wal_level=logical
账号具有访问权限。
建议Mysql、SqlServer、PostgreSQL都使用日志
假设源表数据格式
先确保环境已安装JDK和Maven
$ git clone https://gitee.com/ghi/dbsyncer.git
$ cd dbsyncer
$ chmod u+x build.sh
$ ./build.sh
Sign in to post a comment
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.
Repository Comments ( 124 )