Home > Database > Redis > Why redis is safe

Why redis is safe

(*-*)浩
Release: 2019-08-02 15:56:52
Original
2060 people have browsed it

We can set the password parameter through the redis configuration file, so that the client needs password verification to connect to the redis service, which can make your redis service more secure.

Why redis is safe

##Example (Recommended learning: Redis video tutorial)

We can check whether password authentication is set by using the following command:

127.0.0.1:6379> CONFIG get requirepass<br>1) "requirepass"<br>2) ""<br>
Copy after login
By default, the requirepass parameter is empty, which means that you can connect to the redis service without passing password authentication.

You can modify this parameter through the following command:

127.0.0.1:6379> CONFIG set requirepass "runoob"<br>OK<br>127.0.0.1:6379> CONFIG get requirepass<br>1) "requirepass"<br>2) "runoob"<br>
Copy after login
After setting the password, the client needs password verification to connect to the redis service, otherwise the command cannot be executed.

Grammar

The basic syntax format of the AUTH command is as follows:

127.0.0.1:6379> AUTH password<br>
Copy after login

Example

127.0.0.1:6379> AUTH "runoob"<br>OK<br>127.0.0.1:6379> SET mykey "Test value"<br>OK<br>127.0.0.1:6379> GET mykey<br>"Test value"<br>
Copy after login
More Redis For related technical articles, please visit the

Introduction to Using Redis Database Tutorial column to learn!

The above is the detailed content of Why redis is safe. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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