| 配置 | sentinel auth-pass mymaster <password> |
|---|---|
| ACL | sentinel auth-user mymaster <username> |
| 生效 | 哨兵重启或运行时 SENTINEL SET |
示例
示例
sentinel auth-user mymaster appuser
sentinel auth-pass mymaster app-passwordauth-pass 对同一套主从的所有实例生效;密码轮换时要同步更新所有哨兵。
被监控实例设置密码后,哨兵需要 sentinel auth-pass <master-name> <password> 才能连接;6.0+ 支持 sentinel auth-user 指定 ACL 用户。
| 配置 | sentinel auth-pass mymaster <password> |
|---|---|
| ACL | sentinel auth-user mymaster <username> |
| 生效 | 哨兵重启或运行时 SENTINEL SET |
sentinel auth-user mymaster appuser
sentinel auth-pass mymaster app-password