a tool to receive mysql binlog and push data to elastic search
Flag | Default Value | Description |
---|---|---|
-config | config.yaml | config file |
-dump | false | dump all data before receiving binlog |
Note: each table MUST have an id
field.
address: localhost:3306
user: root
password: root
elastic_url: http://localhost:9200
schemas:
my_db:
tables:
my_table_1:
columns:
- id
- my_column
my_table_2:
columns:
- id
- my_column
my_db_2:
tables:
my_table_3:
columns:
- id
- my_column
need c++ build tools and have mysqldump binary installed in PATH
go build . -o go-canal
Or, you can use docker.
docker run -v config.yaml:/etc/canal/config.taml shi2002/go-canal:latest
This project exists thanks to all the people who contribute.