You can set the #no_loose_disabled-commands parameter in the ApsaraDB for Redis console to disable specific commands that may degrade service performance and cause data loss.
In specific scenarios, unlimited use of commands may cause issues. Specific commands clear most of or all the data, such as FLUSHALL and FLUSHDB. Improper use of specific commands may block the ApsaraDB for Redis service and instance performance, such as KEYS and HGETALL. You can disable specific commands based on your business needs.
To ensure stable instance performance for ApsaraDB for Redis, specific commands cannot be disabled, such as SAVE and SHUTDOWN. For more information, see High-risk commands that cannot be disabled.
- Log on to the ApsaraDB for Redis console and go to the Instances page. In the top navigation bar, select the region in which the instance is deployed. Then, find the instance and click its ID.
- In the left-side navigation pane, click System Parameters.
- On the System Parameters page, find the #no_loose_disabled-commands parameter and click Modify in the Actions column.
- In the dialog box that appears, specify the commands that you want to disable. Note The commands that you specify can contain only lowercase letters. Separate multiple commands with commas (,). Example: keys,flushall.
- Click OK.
(error) ERR command 'FLUSHALL' not support for normal user.
High-risk commands that cannot be disabled
The following commands cannot be disabled: MIGRATE, RESTORE-ASKING, SHUTDOWN, LASTSAVE, SAVE, BGREWRITEAOF, REPLICAOF, BGSAVE, PFDEBUG, PFSELFTEST, SLAVEOF, ACL, MODULE, and DEBUG.
Related API operations
|DescribeParameters||Queries the configuration and operational parameters of an ApsaraDB for Redis instance.|
|ModifyInstanceConfig||Modifies parameters of an ApsaraDB for Redis instance.|