Redis v2.4.6 如何让Redis slave只读?
How to make Redis slave read only in Redis v2.4.6?
我在 redis.conf
文件中使用了 slave-read-only yes。
CONFIG SET "slave-read-only" "yes"
(error) ERR Unsupported CONFIG parameter: slave-read-only
如何设置相同?
Since Redis 2.6, slaves support a read-only mode that is enabled by default. This behavior is controlled by the slave-read-only
option in the redis.conf file, and can be enabled and disabled at runtime using CONFIG SET.
对于 2.6 之前的任何 Redis 版本,slave-read-only
参数不可用(因此无法识别)。因此,在 Redis v2.4.6 中,您将无法设置该参数。
我在 redis.conf
文件中使用了 slave-read-only yes。
CONFIG SET "slave-read-only" "yes"
(error) ERR Unsupported CONFIG parameter: slave-read-only
如何设置相同?
Since Redis 2.6, slaves support a read-only mode that is enabled by default. This behavior is controlled by the
slave-read-only
option in the redis.conf file, and can be enabled and disabled at runtime using CONFIG SET.
对于 2.6 之前的任何 Redis 版本,slave-read-only
参数不可用(因此无法识别)。因此,在 Redis v2.4.6 中,您将无法设置该参数。