Password problem for redis setting under php

coldplay.xixi
Release: 2023-03-03 21:30:01
Original
2823 people have browsed it

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template