from:https://blog.csdn.net/mingjie1212/article/details/51778914
redis 设置密码登陆后使用service redis stop 会出现
-
[root@localhost bin]# service redis stop
-
Stopping ...
-
(error) NOAUTH Authentication required.
-
Waiting for Redis to shutdown ...
-
Waiting for Redis to shutdown ...
-
Waiting for Redis to shutdown ...
-
Waiting for Redis to shutdown ...
-
Waiting for Redis to shutdown ...
这样的错误,而且redis 这时是没有停止服务的。
当然可以使用ps -ef 查进程号 然后kill 掉,如果在deamon下 这样还要去删除pid文件,有点繁琐。
解决办法:
用redis-cli 密码登陆 然后shutdown 然后exit 就OK了。
-
[root@localhost bin]# redis-cli -a 123456
-
127.0.0.1:6379> SHUTDOWN
-
not connected> exit
再用ps -ef 可以看到redis进程已经退出。