Redis 6.0支持及禁用的命令
华为云DCS Redis 6.0完全兼容开源Redis 6。
本章节主要介绍DCS Redis 6.0命令的兼容性,包括支持命令列表,禁用命令列表。
命令的具体详细语法,请前往Redis官方网站查看。
DCS Redis缓存实例支持Redis的绝大部分命令,任何兼容Redis协议的客户端都可以访问DCS。
- 因安全原因,部分Redis命令在分布式缓存服务中被禁用,具体请见Redis 6.0禁用的命令。
- DCS集群实例支持多个key,但不支持跨slot访问的Redis命令列表,如实例受限使用命令所示。
- 部分Redis命令使用时有限制,例如KEYS、FLUSHDB、FLUSHALL等,具体请见部分命令使用限制。
- 部分高危命令支持命令重命名,具体请见支持重命名的命令。
Redis 6.0基础版支持的命令
各个命令的具体详细语法请前往Redis官方网站查看,例如您想了解SCAN命令的使用,可在Redis官方网站中搜索框中输入“SCAN”查询详细介绍。
DEL |
APPEND |
HDEL |
BLPOP |
SADD |
ZADD |
FLUSHALL |
DUMP |
BITCOUNT |
HEXISTS |
BRPOP |
SCARD |
ZCARD |
FLUSHDB |
EXISTS |
BITOP |
HGET |
BRPOPLRUSH |
SDIFF |
ZCOUNT |
DBSIZE |
EXPIRE |
BITPOS |
HGETALL |
LINDEX |
SDIFFSTORE |
ZINCRBY |
TIME |
MOVE |
DECR |
HINCRBY |
LINSERT |
SINTER |
ZRANGE |
INFO |
PERSIST |
DECRBY |
HINCRBYFLOAT |
LLEN |
SINTERSTORE |
ZRANGEBYSCORE |
CONFIG GET |
PTTL |
GET |
HKEYS |
LPOP |
SISMEMBER |
ZRANK |
MONITOR |
RANDOMKEY |
GETRANGE |
HMGET |
LPUSHX |
SMEMBERS |
ZREMRANGEBYRANK |
SLOWLOG |
RENAME |
GETSET |
HMSET |
LRANGE |
SMOVE |
ZREMRANGEBYCORE |
ROLE |
RENAMENX |
INCR |
HSET |
LREM |
SPOP |
ZREVRANGE |
SWAPDB |
RESTORE |
INCRBY |
HSETNX |
LSET |
SRANDMEMBER |
ZREVRANGEBYSCORE |
MEMORY |
SORT |
INCRBYFLOAT |
HVALS |
LTRIM |
SREM |
ZREVRANK |
CONFIG |
TTL |
MGET |
HSCAN |
RPOP |
SUNION |
ZSCORE |
ACL |
TYPE |
MSET |
HSTRLEN |
RPOPLPU |
SUNIONSTORE |
ZUNIONSTORE |
COMMAND |
SCAN |
MSETNX |
HLEN |
RPOPLPUSH |
SSCAN |
ZINTERSTORE |
- |
OBJECT |
PSETEX |
- |
RPUSH |
SMISMEMBER |
ZSCAN |
- |
PEXPIREAT |
SET |
- |
RPUSHX |
- |
ZRANGEBYLEX |
- |
PEXPIRE |
SETBIT |
- |
LPUSH |
- |
ZLEXCOUNT |
- |
KEYS |
SETEX |
- |
BLMOVE |
- |
ZPOPMIN |
- |
COPY |
SETNX |
- |
LMOVE |
- |
ZPOPMAX |
- |
- |
SETRANGE |
- |
LPOS |
- |
ZREMRANGEBYSCORE |
- |
- |
STRLEN |
- |
- |
- |
ZREM |
- |
- |
BITFIELD |
- |
- |
- |
ZDIFF |
- |
- |
BITFIELD_RO |
- |
- |
- |
ZDIFFSTORE |
- |
- |
GETDEL |
- |
- |
- |
ZINTER |
- |
- |
GETEX |
- |
- |
- |
ZMSCORE |
- |
- |
- |
- |
- |
- |
ZRANDMEMBER |
- |
- |
- |
- |
- |
- |
ZRANGESTORE |
- |
- |
- |
- |
- |
- |
ZUNION |
- |
PFADD |
PSUBSCRIBE |
DISCARD |
AUTH |
EVAL |
GEOADD |
XACK |
PFCOUNT |
PUBLISH |
EXEC |
ECHO |
EVALSHA |
GEOHASH |
XADD |
PFMERGE |
PUBSUB |
MULTI |
PING |
SCRIPT EXISTS |
GEOPOS |
XCLAIM |
- |
PUNSUBSCRIBE |
UNWATCH |
QUIT |
SCRIPT FLUSH |
GEODIST |
XDEL |
- |
SUBSCRIBE |
WATCH |
SELECT(Cluster集群实例不支持) |
SCRIPT KILL |
GEORADIUS |
XGROUP |
- |
UNSUBSCRIBE |
- |
CLIENT CACHING |
SCRIPT LOAD |
GEORADIUSBYMEMBER |
XINFO |
- |
- |
- |
CLIENT GETREDIR |
- |
- |
XLEN |
- |
- |
- |
CLIENT INFO |
- |
- |
XPENDING |
- |
- |
- |
CLIENT TRACKING |
- |
- |
XRANGE |
- |
- |
- |
CLIENT TRACKINGINFO |
- |
- |
XREAD |
- |
- |
- |
CLIENT UNPAUSE |
- |
- |
XREADGROUP |
- |
- |
- |
CLIENT KILL |
- |
- |
XREVRANGE |
- |
- |
- |
CLIENT LIST |
- |
- |
XTRIM |
- |
- |
- |
CLIENT GETNAME |
- |
- |
XAUTOCLAIM |
- |
- |
- |
CLIENT SETNAME |
- |
- |
XGROUP CREATECONSUMER |
- |
- |
- |
HELLO |
- |
- |
- |
- |
- |
- |
RESET |
- |
- |
- |
DEL |
APPEND |
HDEL |
BLPOP |
SADD |
ZADD |
FLUSHALL (不支持FLUSHALL SYNC) |
DUMP |
BITCOUNT |
HEXISTS |
BRPOP |
SCARD |
ZCARD |
FLUSHDB |
EXISTS |
BITOP |
HGET |
BRPOPLRUSH |
SDIFF |
ZCOUNT |
DBSIZE |
EXPIRE |
BITPOS |
HGETALL |
LINDEX |
SDIFFSTORE |
ZINCRBY |
TIME |
MOVE |
DECR |
HINCRBY |
LINSERT |
SINTER |
ZRANGE |
INFO |
PERSIST |
DECRBY |
HINCRBYFLOAT |
LLEN |
SINTERSTORE |
ZRANGEBYSCORE |
ROLE |
PTTL |
GET |
HKEYS |
LPOP |
SISMEMBER |
ZRANK |
MEMORY |
RENAME |
GETRANGE |
HMGET |
LPUSHX |
SMEMBERS |
ZREMRANGEBYRANK |
COMMAND |
RENAMENX |
GETSET |
HMSET |
LRANGE |
SMOVE |
ZREMRANGEBYCORE |
COMMAND COUNT |
RESTORE |
INCR |
HSET |
LREM |
SPOP |
ZREVRANGE |
COMMAND GETKEYS |
SORT |
INCRBY |
HSETNX |
LSET |
SRANDMEMBER |
ZREVRANGEBYSCORE |
COMMAND INFO |
TTL |
INCRBYFLOAT |
HVALS |
LTRIM |
SREM |
ZREVRANK |
CONFIG GET |
TYPE |
MGET |
HSCAN |
RPOP |
SUNION |
ZSCORE |
CONFIG RESETSTAT |
SCAN |
MSET |
HSTRLEN |
RPOPLPUSH |
SUNIONSTORE |
ZUNIONSTORE |
CONFIG REWRITE |
OBJECT |
MSETNX |
HLEN |
RPUSH |
SSCAN |
ZINTERSTORE |
CONFIG SET |
PEXPIRE |
PSETEX |
HKEYS |
RPUSHX |
SMISMEMBER |
ZSCAN |
- |
PEXPIREAT |
SET |
HRANDFIELD |
LPUSH |
- |
ZRANGEBYLEX |
- |
EXPIREAT |
SETBIT |
- |
BLMOVE |
- |
ZLEXCOUNT |
- |
KEYS |
SETEX |
- |
LMOVE |
- |
ZREMRANGEBYSCORE |
- |
UNLINK |
SETNX |
- |
LPOS |
- |
ZREM |
- |
TOUCH |
SETRANGE |
- |
- |
- |
ZREMRANGEBYLEX |
- |
RANDOMKEY |
STRLEN |
- |
- |
- |
ZPOPMAX |
- |
COPY |
BITFIELD |
- |
- |
- |
ZPOPMIN |
- |
- |
GETBIT |
- |
- |
- |
BZPOPMAX |
- |
- |
BITFIELD_RO |
- |
- |
- |
BZPOPMIN |
- |
- |
GETDEL |
- |
- |
- |
ZREVRANGEBYLEX |
- |
- |
GETEX |
- |
- |
- |
ZDIFF |
- |
- |
- |
- |
- |
- |
ZDIFFSTORE |
- |
- |
- |
- |
- |
- |
ZINTER |
- |
- |
- |
- |
- |
- |
ZMSCORE |
- |
- |
- |
- |
- |
- |
ZRANDMEMBER |
- |
- |
- |
- |
- |
- |
ZRANGESTORE |
- |
- |
- |
- |
- |
- |
ZUNION |
- |
PFADD |
PSUBSCRIBE |
DISCARD |
AUTH |
EVAL |
GEOADD |
CLUSTER INFO |
PFCOUNT |
PUBLISH |
EXEC |
ECHO |
EVALSHA |
GEOHASH |
CLUSTER NODES |
PFMERGE |
PUBSUB |
MULTI |
PING |
SCRIPT EXISTS |
GEOPOS |
CLUSTER SLOTS |
- |
PUNSUBSCRIBE |
UNWATCH |
QUIT |
SCRIPT FLUSH |
GEODIST |
CLUSTER ADDSLOTS |
- |
SUBSCRIBE |
WATCH |
SELECT |
SCRIPT KILL |
GEORADIUS |
ASKING |
- |
UNSUBSCRIBE |
- |
CLIENT KILL |
SCRIPT LOAD |
GEORADIUSBYMEMBER |
READONLY |
- |
- |
- |
CLIENT LIST |
SCRIPT DEBUG YES|SYNC|NO |
GEOSEARCH |
READWRITE |
- |
- |
- |
CLIENT GETNAME |
- |
GEOSEARCHSTORE |
- |
- |
- |
- |
CLIENT SETNAME |
- |
- |
- |
- |
- |
- |
HELLO |
- |
- |
- |
DEL |
APPEND |
HDEL |
BLPOP |
SADD |
ZADD |
FLUSHALL (不支持FLUSHALL SYNC) |
DUMP |
BITCOUNT |
HEXISTS |
BRPOP |
SCARD |
ZCARD |
FLUSHDB |
EXISTS |
BITOP |
HGET |
BRPOPLRUSH |
SDIFF |
ZCOUNT |
DBSIZE |
EXPIRE |
BITPOS |
HGETALL |
LINDEX |
SDIFFSTORE |
ZINCRBY |
TIME |
MOVE |
DECR |
HINCRBY |
LINSERT |
SINTER |
ZRANGE |
INFO |
PERSIST |
DECRBY |
HINCRBYFLOAT |
LLEN |
SINTERSTORE |
ZRANGEBYSCORE |
MONITOR |
PTTL |
GET |
HKEYS |
LPOP |
SISMEMBER |
ZRANK |
SLOWLOG |
RANDOMKEY |
GETRANGE |
HMGET |
LPUSHX |
SMEMBERS |
ZREMRANGEBYRANK |
ROLE |
RENAME |
GETSET |
HMSET |
LRANGE |
SMOVE |
ZREMRANGEBYCORE |
SWAPDB |
RENAMENX |
INCR |
HSET |
LREM |
SPOP |
ZREVRANGE |
MEMORY |
RESTORE |
INCRBY |
HSETNX |
LSET |
SRANDMEMBER |
ZREVRANGEBYSCORE |
COMMAND |
SORT |
INCRBYFLOAT |
HVALS |
LTRIM |
SREM |
ZREVRANK |
COMMAND COUNT |
TTL |
MGET |
HSCAN |
RPOP |
SUNION |
ZSCORE |
COMMAND GETKEYS |
TYPE |
MSET |
HSTRLEN |
RPOPLPUSH |
SUNIONSTORE |
ZUNIONSTORE |
COMMAND INFO |
SCAN |
MSETNX |
HLEN |
RPUSH |
SSCAN |
ZINTERSTORE |
CONFIG GET |
OBJECT |
PSETEX |
HRANDFIELD |
RPUSHX |
SMISMEMBER |
ZSCAN |
CONFIG RESETSTAT |
PEXPIRE |
SET |
- |
LPUSH |
- |
ZRANGEBYLEX |
CONFIG REWRITE |
PEXPIREAT |
SETBIT |
- |
BLMOVE |
- |
ZLEXCOUNT |
CONFIG SET |
EXPIREAT |
SETEX |
- |
LMOVE |
- |
ZREMRANGEBYSCORE |
- |
KEYS |
SETNX |
- |
LPOS |
- |
ZREM |
- |
UNLINK |
SETRANGE |
- |
- |
- |
ZREMRANGEBYLEX |
- |
TOUCH |
STRLEN |
- |
- |
- |
BZPOPMAX |
- |
COPY |
BITFIELD |
- |
- |
- |
BZPOPMIN |
- |
- |
GETBIT |
- |
- |
- |
ZPOPMAX |
- |
- |
BITFIELD_RO |
- |
- |
- |
ZPOPMIN |
- |
- |
GETDEL |
- |
- |
- |
ZREVRANGEBYLEX |
- |
- |
GETEX |
- |
- |
- |
ZDIFF |
- |
- |
- |
- |
- |
- |
ZDIFFSTORE |
- |
- |
- |
- |
- |
- |
ZINTER |
- |
- |
- |
- |
- |
- |
ZMSCORE |
- |
- |
- |
- |
- |
- |
ZRANDMEMBER |
- |
- |
- |
- |
- |
- |
ZRANGESTORE |
- |
- |
- |
- |
- |
- |
ZUNION |
- |
PFADD |
PSUBSCRIBE |
DISCARD |
AUTH |
EVAL |
GEOADD |
XAUTOCLAIM |
PFCOUNT |
PUBLISH |
EXEC |
ECHO |
EVALSHA |
GEOHASH |
XGROUP CREATECONSUMER |
PFMERGE |
PUBSUB |
MULTI |
PING |
SCRIPT EXISTS |
GEOPOS |
XACK |
- |
PUNSUBSCRIBE |
UNWATCH |
QUIT |
SCRIPT FLUSH |
GEODIST |
XADD |
- |
SUBSCRIBE |
WATCH |
SELECT |
SCRIPT KILL |
GEORADIUS |
XCLAIM |
- |
UNSUBSCRIBE |
- |
CLIENT KILL |
SCRIPT LOAD |
GEORADIUSBYMEMBER |
XDEL |
- |
- |
- |
CLIENT LIST |
SCRIPT DEBUG YES|SYNC|NO |
GEOSEARCH |
XGROUP |
- |
- |
- |
CLIENT GETNAME |
- |
GEOSEARCHSTORE |
XINFO |
- |
- |
- |
CLIENT SETNAME |
- |
- |
XLEN |
- |
- |
- |
HELLO |
- |
- |
XPENDING |
- |
- |
- |
- |
- |
- |
XRANGE |
- |
- |
- |
- |
- |
- |
XREAD |
- |
- |
- |
- |
- |
- |
XREADGROUP |
- |
- |
- |
- |
- |
- |
XREVRANGE |
- |
- |
- |
- |
- |
- |
XTRIM |
Redis 6.0企业版支持的命令
以下列出了Redis 6.0企业版实例支持的命令。
COPY |
APPEND |
HDEL |
BLMOVE |
SADD |
BZPOPMAX |
FLUSHALL |
DEL |
BITCOUNT |
HEXISTS |
LINDEX |
SCARD |
BZPOPMIN |
FLUSHDB |
DUMP |
BITOP |
HGET |
LINSERT |
SDIFF |
ZADD |
DBSIZE |
EXISTS |
BITPOS |
HGETALL |
LLEN |
SDIFFSTORE |
ZCARD |
TIME |
EXPIRE |
BITFIELD |
HINCRBY |
LPOP |
SINTER |
ZCOUNT |
INFO |
MOVE |
DECR |
HINCRBYFLOAT |
LPUSHX |
SINTERSTORE |
ZDIFF |
CLIENT KILL |
PERSIST |
DECRBY |
HKEYS |
LRANGE |
SISMEMBER |
ZDIFFSTORE |
CLIENT LIST |
PTTL |
GET |
HMGET |
LREM |
SMEMBERS |
ZINCRBY |
CLIENT GETNAME |
RANDOMKEY |
GETRANGE |
HMSET |
LSET |
SMOVE |
ZINTER |
CLIENT SETNAME |
RENAME |
GETSET |
HSET |
LTRIM |
SPOP |
ZINTERSTORE |
CONFIG GET |
RENAMENX |
GETDEL |
HSETNX |
RPOP |
SRANDMEMBER |
ZLEXCOUNT |
MONITOR |
SORT |
GETEX |
HVALS |
LMOVE |
SREM |
ZMSCORE |
SLOWLOG |
TTL |
INCR |
HSCAN |
RPOPLPUSH |
SUNION |
ZPOPMAX |
ROLE |
TYPE |
INCRBY |
HSTRLEN |
RPUSH |
SUNIONSTORE |
ZPOPMIN |
SWAPDB |
SCAN |
INCRBYFLOAT |
HLEN |
RPUSHX |
SSCAN |
ZRANDMEMBER |
MEMORY |
PEXPIREAT |
MGET |
HRANDFIELD |
LPUSH |
SMISMEMBER |
ZRANGE |
LASTSAVE |
PEXPIRE |
MSET |
- |
BLPOP |
- |
ZRANGEBYLEX |
REPLCONF |
OBJECT ENCODING |
MSETNX |
- |
BRPOP |
- |
ZRANGEBYSCORE |
LASTSAVE |
OBJECT FREQ |
PSETEX |
- |
BRPOPLPUSH |
- |
ZRANGESTORE |
COMMAND |
OBJECT IDLETIME |
SET |
- |
LPOS |
- |
ZRANK |
COMMAND COUNT |
OBJECT REFCOUNT |
SETBIT |
- |
- |
- |
ZREM |
COMMAND GETKEYS |
RESTORE |
SETEX |
- |
- |
- |
ZREMRANGEBYLEX |
COMMAND INFO |
TOUCH |
SETNX |
- |
- |
- |
ZREMRANGEBYRANK |
CONFIG |
UNLINK |
SETRANGE |
- |
- |
- |
ZREMRANGEBYSCORE |
- |
EXPIREAT |
STRLEN |
- |
- |
- |
ZREVRANGE |
- |
KEYS |
SUBSTR |
- |
- |
- |
ZREVRANGEBYLEX |
- |
WAIT |
- |
- |
- |
- |
ZREVRANGEBYSCORE |
- |
- |
- |
- |
- |
- |
ZREVRANK |
- |
- |
- |
- |
- |
- |
ZSCAN |
- |
- |
- |
- |
- |
- |
ZSCORE |
- |
- |
- |
- |
- |
- |
ZUNION |
- |
- |
- |
- |
- |
- |
ZUNIONSTORE |
- |
PFADD |
PSUBSCRIBE |
AUTH |
EVAL |
GEOADD |
XACK |
BITCOUNT |
PFCOUNT |
PUBLISH |
CLIENT CACHING |
EVALSHA |
GEODIST |
XADD |
BITFIELD |
PFMERGE |
PUBSUB |
CLIENT GETNAME |
SCRIPT DEBUG |
GEOHASH |
XAUTOCLAIM |
BITFIELD_RO |
PFSELFTEST |
PUNSUBSCRIBE |
CLIENT GETREDIR |
SCRIPT EXISTS |
GEOPOS |
XCLAIM |
BITOP |
- |
SUBSCRIBE |
CLIENT ID |
SCRIPT FLUSH |
GEORADIUS |
XDEL |
BITPOS |
- |
UNSUBSCRIBE |
CLIENT INFO |
SCRIPT KILL |
GEORADIUSBYMEMBER |
XGROUP |
GETBIT |
- |
- |
CLIENT KILL |
SCRIPT LOAD |
GEORADIUSBYMEMBER_RO |
XINFO |
SETBIT |
- |
- |
CLIENT LIST |
- |
GEORADIUS_RO |
XLEN |
- |
- |
- |
CLIENT PAUSE |
- |
GEOSEARCH |
XPENDING |
- |
- |
- |
CLIENT REPLY |
- |
GEOSEARCHSTORE |
XRANGE |
- |
- |
- |
CLIENT SETNAME |
- |
- |
XREAD |
- |
- |
- |
CLIENT TRACKING |
- |
- |
XREADGROUP |
- |
- |
- |
CLIENT TRACKINGINFO |
- |
- |
XREVRANGE |
- |
- |
- |
CLIENT UNBLOCK |
- |
- |
XSETID |
- |
- |
- |
CLIENT UNPAUSE |
- |
- |
XTRIM |
- |
- |
- |
ECHO |
- |
- |
- |
- |
- |
- |
HELLO |
- |
- |
- |
- |
- |
- |
PING |
- |
- |
- |
- |
- |
- |
QUIT |
- |
- |
- |
- |
- |
- |
RESET |
- |
- |
- |
- |
- |
- |
SELECT |
- |
- |
- |
- |
Redis 6.0禁用的命令
MIGRATE |
SLAVEOF |
CLUSTER MEET |
- |
SHUTDOWN |
CLUSTER FLUSHSLOTS |
- |
LASTSAVE |
CLUSTER ADDSLOTS |
- |
DEBUG相关类 |
CLUSTER DELSLOTS |
- |
SAVE |
CLUSTER SETSLOT |
- |
BGSAVE |
CLUSTER BUMPEPOCH |
- |
BGREWRITEAOF |
CLUSTER SAVECONFIG |
- |
SYNC |
CLUSTER FORGET |
- |
PSYNC |
CLUSTER REPLICATE |
- |
- |
CLUSTER COUNT-FAILURE-REPORTS |
- |
- |
CLUSTER FAILOVER |
- |
- |
CLUSTER SET-CONFIG-EPOCH |
- |
- |
CLUSTER RESET |
MIGRATE |
BGREWRITEAOF |
CLIENT CACHING |
MOVE |
BGSAVE |
CLIENT GETREDIR |
WAIT |
CLIENT相关命令 |
CLIENT INFO |
- |
DEBUG OBJECT |
CLIENT TRACKING |
- |
DEBUG SEGFAULT |
CLIENT TRACKINGINFO |
- |
LASTSAVE |
CLIENT UNPAUSE |
- |
PSYNC |
RESET |
- |
SAVE |
- |
- |
SHUTDOWN |
- |
- |
SLAVEOF |
- |
- |
LATENCY相关命令 |
- |
- |
MODULE相关命令 |
- |
- |
LOLWUT |
- |
- |
SWAPDB |
- |
- |
REPLICAOF |
- |
- |
SYNC |
- |
- |
ACL |
- |
- |
FAILOVER |
- |
MIGRATE |
BGREWRITEAOF |
CLIENT CACHING |
WAIT |
BGSAVE |
CLIENT GETREDIR |
- |
DEBUG OBJECT |
CLIENT INFO |
- |
DEBUG SEGFAULT |
CLIENT TRACKING |
- |
LASTSAVE |
CLIENT TRACKINGINFO |
- |
LOLWUT |
CLIENT UNPAUSE |
- |
MODULE LIST/LOAD/UNLOAD |
RESET |
- |
PSYNC |
- |
- |
REPLICAOF |
- |
- |
SAVE |
- |
- |
SHUTDOWN [NOSAVE|SAVE] |
- |
- |
SLAVEOF |
- |
- |
SWAPDB |
- |
- |
SYNC |
- |
- |
ACL |
- |
- |
FAILOVER |
- |
MIGRATE |
SLAVEOF |
PFDEBUG |
- |
SHUTDOWN |
- |
- |
SAVE |
- |
- |
BGSAVE |
- |
- |
BGREWRITEAOF |
- |
- |
SYNC |
- |
- |
PSYNC |
- |
- |
REPLICAOF |
- |
支持重命名的命令
支持重命名的命令 |
command、keys、flushdb、flushall、hgetall、scan、hscan、sscan、和zscan Proxy集群实例还支持dbsize和dbstats命令重命名,其他命令暂时不支持。 |
---|---|
重命名的方式 |
请参考命令重命名。 |