In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
How to set the password for redis? In view of this problem, this article gives the corresponding analysis and answers, hoping to help more friends who want to solve this problem to find a more simple and feasible way.
Password settin
There are two ways to set the redis password, one is to restart the redis service, and the other is not to restart the redis service.
First of all, let's introduce how to restart the redis service.
That is, find the redis configuration file-redis.conf file, and then modify the requirepass in it, which was originally annotated, remove the comments, and set the corresponding fields to your desired password, and save and exit. Restart the redis service.
Here I set the password to 123.
Then there is the password setting method that does not need to restart the redis service.
This is relatively simple. After connecting to 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:
In fact, there is a small problem, that is, after you change the password through the command line, the password after the requirepass field of the configuration file will not be changed accordingly.
What is described above is the sending and sending of the password set by redis, and the specific usage needs to be used by everyone in order to understand it. If you want to know more about it, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Vi convertbalehammer engine.shrunken engine. Hobbies.
© 2024 shulou.com SLNews company. All rights reserved.