Help Center/ TaurusDB/ Troubleshooting/ Binlog Issues/ Insufficient Privileges Reported When the root User Runs the PURGE BINARY LOGS Command
Updated on 2026-03-19 GMT+08:00

Insufficient Privileges Reported When the root User Runs the PURGE BINARY LOGS Command

Scenario

When the root user runs the PURGE BINARY LOGS command, the following error information is displayed:

ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER or BINLOG_ADMIN privilege(s) for this operation

Possible Causes

During instance creation, the BINLOG_ADMIN privilege is not granted to the root user by default. This privilege needs to be manually granted.

Solution

Use the root account to grant the BINLOG_ADMIN privilege to itself.

GRANT BINLOG_ADMIN ON *.* TO `root`@`%` WITH GRANT OPTION; FLUSH PRIVILEGES;