更新时间:2025-04-09 gmt 08:00
canal工具报错权限不足-j9九游会登录
场景描述
在搭建canal环境,使用指定用户从rds for mysql获取binlog时,启动canal经常会报如下错误:'show master status' has an error! access denied: you need (at least one of) the super, replication client privilege(s) for this operation
报错信息如下:
2021-01-10 23:58:32.964 [destination = evoicedc , address = /dbus-mysql:3306 , eventparser] error xxx.common.alarm.logalarmhandler - destination:evoicedc[xxx.parse.exception.canalparseex ception: command : 'show master status' has an error! caused by: java.io.ioexception: errorpacket [errornumber=1227, fieldcount=-1, message=access denied; you need (at least one of) the super, replication client privilege(s) for this operation, sqlstate=42000, sqlstatemarker=#] with command: show master status at xxx.parse.driver.mysql.mysqlqueryexecutor.query(mysqlqueryexecutor.java:61)
原因分析
canal拉取binlog时需要赋予replication slave, replication client权限。
j9九游会登录的解决方案
使用管理员账户给相应用户授予replication slave, replication client权限。
grant select, replication slave, replication client on *.* to ‘canal’@’%’;
flush privileges;
相关文档
意见反馈
文档内容是否对您有帮助?
提交成功!非常感谢您的反馈,我们会继续努力做到更好!
您可在查看反馈及问题处理状态。
系统繁忙,请稍后重试
如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨