1. An error is reported when the redis service is closed
/etc/init.d/redis_6379 restart
Stopping ...
(error) NOAUTH Authentication required.
Waiting for Redis to shutdown ...
Waiting for Redis to shutdown ...
2. Solution
(1) Close the redis database password
[root@localhost ~]#redis-cli -p 6379
127.0.0.1:6379> AUTH 123456
OK
127.0.0.1:6379> config set requirepass
(error) ERR Unknown subcommand or wrong number of arguments for 'set'. Try CONFIG HELP.
127.0.0.1:6379> config set requirepass '' #关键需要改空密码
OK
127.0.0.1:6379> quit
[root@localhost ~]#/etc/init.d/redis_6379 restart
Stopping ...
Redis stopped
Starting Redis server...
[root@localhost ~]#
(2) Kil kills the process
-
I first checked whether the service was still running, and then checked the configuration file, there was no problem
-
So I want to kill the redis service by killing it and start it again. It prompts that the /var/run/redis_6379.pid file exists, delete the pid file, restart the service, and it succeeds.
-
You can log in, but the password is gone
(3) Direct rm to delete the pid file, you can log in, the password is still there