遇见的问题
执行以下命令遇见的问题
cd $GOPATH/src/github.com/siddontang/go-mysql-elasticsearch
./bin/go-mysql-elasticsearch -config=./etc/river.toml
Warning: Using a password on the command line interface can be insecure.
mysqldump: Error: Binlogging on server not active
一个是因为我在mysql_dump_back.sh里面配置了登录数据库账号的密码,mysqldump提示不安全,另外一个错误,在搜索了一些资料后,只需要在/etc/my.cnf里面开启log_bin(数据库的操作日志)功能,然后重启mysql即可解决问题
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
log_bin=mysql-bin
更改状态
SET GLOBAL binlog_format = ‘ROW’;
SET SESSION binlog_format = ‘ROW’;
或者打开my.cnf
log-bin = mysql-bin
# binlog_format = "STATEMENT"
binlog_format = "ROW"
# binlog_format = "MIXED"
- 这配置文件设置了server_id以后,还需要在数据库的my.cnf里在设置一次serve_idy要一样,…一样不一样都不对.
错误信息:
ERRO[0000] close sync with err: ERROR 1236 (HY000): Misconfigured master - server_id was not set
ERRO[0000] canal start sync binlog err: ERROR 1236 (HY000): Misconfigured master - server_id was not set