This article will introduce you to the basic steps of redis access permission control and password setting. Friends who need to know more can refer to it.
As a high-speed database, redis must have corresponding security mechanisms to protect it on the Internet.
1. A safer way is to control by binding IP.
The code is as follows
|
Copy code
|
||||||||||||
bind 127.0.0.1
means that only access through the IP address 127.0.0.1 is allowed. Then in fact, only you can access yourself, and no other machines can access him. This command needs to be modified in redis.conf.
Please note here Our common startup method is src/redis-server changed to
Because it needs to load the configuration file. This method is not very good. It is inevitable that I have multiple machines accessing a redis service
requirepass yourpassword After setting the password, I found that I can log in, but cannot execute the command. |
http: //www.bkjia.com/PHPjc/630681.html