redis 认证密码

 

[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> 

 

posted @ 2016-07-05 10:18  bass  阅读(168)  评论(0编辑  收藏  举报