Updated on 2023-03-06 GMT+08:00

Insufficient Permissions Reported for Canal

Scenario

When you start Canal while obtaining binlogs from RDS for MySQL using a specified user account, the following error message is often displayed: 'show master status' has an error! Access denied: you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation.

The complete message will look something like this:

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) 

Possible Causes

The user account does not have the REPLICATION SLAVE or REPLICATION CLIENT permissions.

Solution

Grant the REPLICATION SLAVE and REPLICATION CLIENT permissions to the user account as the administrator.

GRANT SELECT, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'canal'@'%';

FLUSH PRIVILEGES;