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

Global Parameters Fail to Change

Scenario

A global parameter failed to be changed for an RDS for MySQL instance.

MySQL [(none)]> show variables like 'binlog_expire_logs_seconds';
+----------------------------+-------+
| Variable_name              | Value |
+----------------------------+-------+
| binlog_expire_logs_seconds | 3600  |
+----------------------------+-------+
1 row in set (0.00 sec) 
MySQL [(none)]> set global binlog_expire_logs_seconds=600;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation 
MySQL [(none)]>

Solution

Change global parameters on the RDS console because RDS for MySQL does not support global parameter changes using commands. For details, see Can I Use SQL Commands to Modify Global Parameters?