After installing Redis, there has been no security or user control over it. Later, in response to business requirements, user verification was added to Redis. The following is the specific configuration:
Set verification password
There are several ways to set verification password:
1) Modify the configuration file redis.conf settings:
2) You can set the password and get the current user password through the config command, as follows:
redis 127.0.0.1:6379[1]> config set requirepass 123456 OK redis 127.0.0.1:6379[1]> config get requirepass 1) "requirepass" 2) "123456"
3) After setting the verification password, the redis service needs to pass the password verification before it can be shut down, so the command is modified For:
$ redis-cli –a 123456 shutdown
For more redis knowledge, please pay attention to the redis introductory tutorial column.
The above is the detailed content of redis user authentication setting method. For more information, please follow other related articles on the PHP Chinese website!