go-mysql-org / go-mysql-elasticsearch

Sync MySQL data into elasticsearch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

同步的时候river.go报错:river.go:213: no source data defined

kingsun998 opened this issue · comments

[2020/02/17 20:22:02] [info] binlogsyncer.go:141 create BinlogSyncer with config {1001 mysql 127.0.0.1 3306 root utf8 false false false UTC false 0 0s 0s 0 false 0}

C:/Users/71991/go/src/github.com/siddontang/go-mysql-elasticsearch/river/river.go:213: no source data defined
C:/Users/71991/go/src/github.com/siddontang/go-mysql-elasticsearch/river/river.go:222:
C:/Users/71991/go/src/github.com/siddontang/go-mysql-elasticsearch/river/river.go:60:

river.toml //source配置了的呀
my_addr = "127.0.0.1:3306"
my_user = "root"
my_pass = "xx"
my_charset = "utf8"

Elasticsearch address

es_addr = "127.0.0.1:9200"
es_user = ""
es_pass = ""

data_dir = "./var"

stat_addr = "127.0.0.1:12800"
stat_path = "/metrics"

server_id = 1001

flavor = "mysql"

mysqldump = "mysqldump"

bulk_size = 128

flush_bulk_time = "200ms"

skip_no_pk_table = false

[[source]]
schema = "bysj"

[[rule]]
schema = "bysj"
table = "yqms"
index = "bysj"
type = "yqms"

解决了,文件没写对