In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the method of setting password in Redis, which has certain reference value, friends who need it can refer to it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
Method 1: set it through the configuration file (/ etc/redis.conf)
This method takes effect by restarting redis after setting the password. First find the redis configuration file-redis.conf file, and then modify the requirepass (requirepass is the parameter to configure the redis access password). This was originally annotated, remove the comment, and set the corresponding field to the password you want to save and exit. Restart the redis service.
Here I set the password to 123.
Method 2: set the password through the command
This approach is relatively simple and does not require a restart of the redis service. After connecting to the redis, set it through the command as follows:
Config set requirepass 123456
Thus, the password is set to 123456
Once set, you can view the password with the following instructions
Config get requirepass
After the password is set, when you exit and connect to redis again, you need to enter the password, otherwise it is inoperable. There are two ways to enter a password. One is to enter the password directly when you connect, and then enter the password after the connection, as shown below:
Note: after you change the password from the command line, the password after the requirepass field of the configuration file (/ etc/redis.conf) will not be changed accordingly.
Thank you for reading this article carefully. I hope the editor will share what the Redis password setting method is helpful to everyone. At the same time, I also hope that you will support it, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.