我在 redis.conf
文件中使用了从属只读 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 - 如何在Redis v2.4.6中使Redis从站只读?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58132649/