Home >Backend Development >PHP Problem >Password problem for redis setting under php

Password problem for redis setting under php

coldplay.xixi
coldplay.xixiOriginal
2020-08-06 10:19:482855browse

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.

Password problem for redis setting under php

How to set the password for redis under php:

1. Open /path/to/redis.conf

Modify

Password problem for redis setting under php

requirepass is followed by the password you want to set

2. Restart the redis service

The code is as follows:

Password problem for redis setting under php

3. connect(ip,port)

auth('password already set');

Password problem for redis setting under php

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn