Canal权限问题排查
原文出处:http://blog.****.net/u011575570/article/details/51319074
问题描述: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
没有错误了,成功。
canal部署:http://blog.****.net/bbirdsky/article/details/41479479
canal-client运行:http://agapple.iteye.com/blog/1796620
canal原理:http://blog.****.net/hyx1990/article/details/52526371