更新时间: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;

相关文档

网站地图