Home >Backend Development >PHP Problem >Password problem for redis setting under php
How to set the password for redis under php: First open [/path/to/redis.conf], modify the password after requirepass; then restart the redis service; finally run it to display the result.
How to set the password for redis under php:
1. Open /path/to/redis.conf
Modify
requirepass is followed by the password you want to set
2. Restart the redis service
The code is as follows:
3. connect(ip,port)
auth('password already set');
The above picture appears, indicating that the connection has been successful
Related learning recommendations: php programming (video)
The above is the detailed content of Password problem for redis setting under php. For more information, please follow other related articles on the PHP Chinese website!