其他分享
首页 > 其他分享> > MaxWell ops

MaxWell ops

作者:互联网

Download

Download binary distro: https://github.com/zendesk/maxwell/releases/download/v1.33.0/maxwell-1.33.0.tar.gz
Sources and bug tracking is available on github: https://github.com/zendesk/maxwell

homebrew:

brew install maxwell

Configure

$ vi my.cnf
[mysqld]
server_id=1
log-bin=master
binlog_format=row

create database maxwell;
CREATE USER 'maxwell'@'%' IDENTIFIED BY 'xxxx';
GRANT ALL ON maxwell.* TO 'maxwell'@'%';
GRANT SELECT, REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO 'maxwell'@'%';

FLUSH PRIVILEGES;


Run Maxwell

Command line

创建 kafka topic maxwell

kafka-topics.sh  --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic maxwell
kafka-topics  --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic maxwell

启动MaxWell

后台启动 指定日志输出目录
nohup ./bin/maxwell \
--user='maxwell' \
--password='xxx' \
--host='xxxxxxx \
--producer=kafka \
--kafka_version=1.0.0 \
--kafka.bootstrap.servers=localhost:9092 \
--kafka_topic=maxwell \
--filter='exclude: *.*, include: xxxxdata_test.*' > ./log/maxwell.log &

后台启动
nohup ./bin/maxwell \
--user='maxwell' \
--password='xxxxx' \
--host='xxxx' \
--producer=kafka \
--kafka_version=1.0.0 \
--kafka.bootstrap.servers=localhost:9092 \
--kafka_topic=maxwell \
--filter='exclude: *.*, include: xxxxdata_test.*' &


./bin/maxwell --user='maxwell' \
--password='xxxxx' \
--host='xxxxx \
--producer=stdout

标签:bin,ops,--,MaxWell,kafka,topic,maxwell,localhost
来源: https://www.cnblogs.com/eistert/p/14736181.html