redis configuration password
On the server, here is a linux server as an example to configure a password for redis.
1. The first method (the current method of linux configuration redis password is temporary, if redis restarts, the password will become invalid)
(1) First enter redis, if redis is not turned on, you need to turn it on first:
(2) Check whether the current redis has set a password:
config get requirepass
(3) There is no password for the above display, then set the password now:
config set requirepass qipa250
(4) Checking the current redis again will prompt for a password:
config get requirepass
2. The second way (permanent way)
If you need to configure the password permanently, go to the redis.conf configuration file to find the requirepass parameter, and configure it as follows:
Modify the redis.conf configuration file
#requirepass foobared
requirepass qipa250 //指定密码qipa250
Restart redisd