Home > Database > Redis > body text

How to solve the problem of invalid Redis setting password

王林
Release: 2023-05-28 18:37:12
forward
4816 people have browsed it

1. Verify whether the password is valid

Run cmd, cd to the redis directory

Enter "redis-cli.exe" and press Enter

Enter "auth 123456” Press Enter

If there is an error, it means that no password has been set or the set password has not taken effect

Enter “exit” and press Enter to exit redis immediately

How to solve the problem of invalid Redis setting password

2. The solution is: directly modify the file with the suffix .conf, and then start it with the command

Find the file with the suffix .conf in the redis directory. The names of the files are not uniform, so I For example, as shown below

How to solve the problem of invalid Redis setting password

# I have two files with the suffix .conf. Both files are opened with an editor, such as Notepad.

After opening the file, "Ctrl F" searches for "requirepass" and finds "# requirepass foobared"

Add a line below "requirepass 123456"

Then save and close,

Note that if you have two files with the suffix .conf like me, then both files must be modified like this

How to solve the problem of invalid Redis setting password

Complete After the above operation, first stop redis in "Service"

Then enter "redis-server.exe redis.windows.conf" in the command window and press Enter

See the following picture to indicate success ( Note that "redis.windows.conf" in the command is the file name with .conf as the suffix. Do not use "redis.windows-service.conf" as long as "redis.windows.conf" )

How to solve the problem of invalid Redis setting password

After completing the above operations, close the command window, and then manually start the redis service

The password will take effect at this time. You can take the first step above to verify it.

How to solve the problem of invalid Redis setting password

all return "OK", which means success.

The above is the detailed content of How to solve the problem of invalid Redis setting password. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!