git-canal:错误修改
问题:2016-05-04 22:53:48.848 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - dump address /127.0.0.1:3306 has an error, ret
问题:2016-05-04 22:53:48.848 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - dump address /127.0.0.1:3306 has an error, retrying. caused by
com.alibaba.otter.canal.parse.exception.CanalParseException: command : ‘show master status’ has an error! pls check. you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation
2016-05-04 22:53:48.852 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[com.alibaba.otter.canal.parse.exception.CanalParseException: command : ‘show master status’ has an error! pls check. you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation
解:首先看错误可以猜测是权限问题,所以
1:给用户重新赋予权限
查看权限:(select * from mysql.user where user=’canal’ \G)
用canal用户查看show master status
看到还是为空,所以可以确定不是权限问题。
2:看下mysql的配置文件(在window下是.ini文件)
看到文件名是my-default.ini,里面也配置了
log-bin=mysql-bin #添加这一行就ok
binlog-format=ROW #选择row模式
server_id=1 #配置mysql replaction需要定义,不能和canal的slaveId重复
这三个,修改下名字,可能mysql没有读这个文件。改为my.ini文件。重启。
重启如果有错误,则在mysql里找.err文件,里面有错误日志
执行show master status
显示信息了,启动下sh bin/start.sh
看日志:tail -f logs/example/example.log
没有错误了,成功。
更多推荐
所有评论(0)