使用go-mysql-starrocks实时同步mysql到starrocks

1. github下载go-mysql-starrocks

2. 修改配置 mysql-to-starrocks.toml

[mysql] ## 配置mysql地址
host = "127.0.0.1"
port = 3306
username = "root"
password = ""

[starrocks] ## 配置sr地址,这里配置load端口
host = "127.0.0.1"
port = 8040
username = "root"
password = ""

[[rule]] ## 配置rule,源库表和目的库表对应关系,多个表配置多个[[rule]]
source-schema = "mysql_test"
source-table = "tb1"
target-schema = "starrocks_test"
target-table = "tb1"

3. 启动

./go-mysql-starrocks-linux-xxxxxx -config starrocks.toml -log-file mysql2starrocks.log -daemon

4. 查看日志

tail -f mysql2starrocks.log

支持prometheus + grafana 监控,github地址

1赞