当前位置:网站首页>Realize incremental data synchronization between MySQL and ES

Realize incremental data synchronization between MySQL and ES

2022-07-07 01:09:00 Ten thousand years is too long, seize the day

Refer to the articles on the Internet : https://zhuanlan.zhihu.com/p/521914517 Step by step

The idea of realizing incremental synchronization is : take mysql Generated by adding, deleting and modifying binlog adopt canal The middleware increment is synchronized to ES in

At first, the version used was :mysql 8.0、canal 1.1.6、Elasticsearch 8.2.3, After all configuration , stay mysql Do update operations to find canal Can't monitor binlog journal , So I thought of falling ES Version of

The version used later is :mysql 8.0、canal 1.1.5、Elasticsearch 7.13.0

And the problems :
1. First canal There are three ends :deployer、adapter、admin deployer Responsible for pulling binlog,adapter Responsible for pulling binlog write in ES In the corresponding index ,admin It is a management end .
2. We need to pay attention to server The configuration of the end is canal1.5/deployer/conf/example Medium instance.properties:
These three items need to be configured additionally :
canal.instance.tsdb.enable=false
canal.instance.filter.query.ddl = false
canal.instance.filter.query.dcl = false

3. Need extra configuration adapter The configuration of the end is canal1.5/adapter/conf Medium application.yml( The first bootstrap.yml Delete it ):
To configure ES The address of , In time, this machine , Don't match 127.0.0.1, Just configure the public network IP That's it
hosts: http://8.136.150.82:9211

This is probably the only way to complete incremental synchronization
In addition, there is an address for reference :https://wenku.baidu.com/view/30903e190a12a21614791711cc7931b764ce7b4a.html

原网站

版权声明
本文为[Ten thousand years is too long, seize the day]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207061720131995.html