实时同步MySQL数据到Elasticsearch

本文介绍了如何使用CDC工具将MySQL数据实时同步到Elasticsearch。可选择Oracle GoldenGate或Maxwell,配合Kafka、Logstash进行数据流转。通过Maxwell简化配置,再利用Logstash过滤和转换数据,最后将数据导入Elasticsearch实现索引实时更新。
摘要由CSDN通过智能技术生成

CDC工具可选择Oracle GoldenGate或者Zendesk开源的Maxwell,MySQL->GoldenGate或Maxwell->Kafka->Logstash->Elasticsearch

如果用商业软件,数据源端安装OracleGoldenGate for MySQL,目标端安装OracleGoldenGate for Big Data. 

而用开源软件Maxwell配置会更简单些,只需编辑文件config.properties

host=localhost

user=root

password=xxxxxxx

kafka_topic=test_topic

启动Zookeeper
bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
启动Kafka
bin/kafka-server-start.sh config/server.properties
启动Maxwell
bin/maxwell --user='root' --password='xxxxxxx' --host='localhost&#

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值