redis - 如何在Redis v2.4.6中使Redis从站只读?

标签 redis replication master-slave

我在 redis.conf 文件中使用了从属只读 yes 。

CONFIG SET "slave-read-only" "yes"
(error) ERR Unsupported CONFIG parameter: slave-read-only

如何设置相同?

最佳答案

来自Redis documentation :

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/

相关文章:

Redis 设置操作选项

r - 使用R//redux向redis传输数据

php - magento 前端突然 503 - 如何调试

多表的 MySQL 数据库复制

replication - 在ArangoDB中,我们可以进行地理分布式分片吗

ruby-on-rails - 考虑到副本延迟的主从复制

redis - 从远程 redis 服务器生成 redis 转储文件或 json 文件

PostgreSQL 可用性和合并

用于生产的 Redis 配置

ssh - Jenkins Slave Permission 在复制 slave.jar 时被拒绝