Merge remote-tracking branch 'origin/main' into practical-training

This commit is contained in:
TsMask
2024-08-03 16:28:13 +08:00

View File

@@ -26,10 +26,18 @@ info replication
slaveof 192.168.114.114 6379 slaveof 192.168.114.114 6379
replicaof 192.168.114.114 6379 replicaof 192.168.114.114 6379
masterauth "helloearth" masterauth "helloearth"
# 允许从节点进行读写操作 # 允许从节点进行读写操作,优先使用replica
slave-read-only yes
replica-read-only no replica-read-only no
``` ```
Redis 主从架构中对用户进行细粒度的读写权限控制
```bash
$ redis-cli -h 192.168.114.114 -p 6379
> ACL SETUSER omcuser on >readwrite|db10
```
## 一些服务器 ## 一些服务器
```txt ```txt