您的位置:首页 > 数据库 > Redis

redis 认证密码

2016-07-05 10:18 459 查看
[root@cache01 ~]# grep "requirepass" /app/server/redis/conf/6379.conf
# If the master is password protected (using the "requirepass" configuration
# requirepass foobared
requirepass bass #主服务器上的认证密码

[root@cache01 ~]# vi /app/server/redis/conf/
6379.conf      6379.conf.bak  dump.rdb
[root@cache01 ~]# vi /app/server/redis/conf/6379.conf
[root@cache01 ~]# service redis stop
Stopping ...
Redis stopped
[root@cache01 ~]# service redis start
Starting Redis server...
[root@cache01 ~]# /app/server/redis/bin/redis-cli
127.0.0.1:6379> set name 123456
(error) NOAUTH Authentication required.
127.0.0.1:6379> auth bass
OK
127.0.0.1:6379>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: