0
Follow
0
View

What about the question of #redis requirepass#?

tongwenbin1984 注册会员
2023-02-25 21:20

This answer partially references GPT and GPT_Pro to better solve the problem.
There are several ways to solve requirepass that cannot be eliminated:

  1. Comment out requirepass in the Redis. conf file and restart the redis service to cancel the requirepass requirement.

  2. You can either set requirepass to empty or cancel requirepass by using the config set requirepass "" command.

  3. Cancel requirepass by commenting it out and saving it using the config rewrite command.

  4. Verify the password directly with the command auth, which also returns OK if the password is empty.

    auth ""
    OK
    

    If the answer is helpful, please accept it.

duhuafeng2006 注册会员
2023-02-25 21:20

All of this has been tried, and requirepass is all in the comments in the configuration file

lovedjj07590 注册会员
2023-02-25 21:20

the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > 1. Depending on what you provide, there are several possible reasons why Redis still requires a password to execute commands:
-
The Redis service is not using the correct configuration file: If the correct profile path is not specified when the Redis service is started, the default profile or another profile may be used, resulting in the modified requirepass configuration not taking effect. You can solve this problem by specifying the configuration file path in the startup command, for example:

redis-server /path/to/redis.conf

2. Multiple requirepass Settings exist in the edis configuration file: If multiple requirepass Settings exist in the Redis configuration file, the modified configuration may not take effect. You can check the configuration file to make sure there is only one requirepass setting, and it is commented out or set to empty.

3.Redis client caches password: If you use a Redis-CLI client and use the AUTH command to authenticate your identity after entering the password, the password may be cached by the client. You can run the CONFIG RESET command to clear the client cache.

4. The Redis instance has its configuration modified by another process: If multiple processes can modify the Redis instance's configuration file, it may cause one process to set the requirepass in the configuration file to a non-null value. You can check the log file of the Redis instance to see if other processes have modified the configuration file.

You can rectify the fault based on the preceding possible causes and take appropriate measures based on the actual situation. If the problem persists, provide more details so you can better locate the problem.

dengfangjian 注册会员
2023-02-25 21:20

1. Check the conf path in the startup command
2. Word matching is done in the conf file, all words of requirepass are in the comment
Is the third clause executed in the client? Side tip without the command < br / >

< div class = "aw - list - img > img

About the Author

Question Info

Publish Time
2023-02-25 21:20
Update Time
2023-02-25 21:20