Easy Tutorial
❮ Keys Pttl Strings Incrbyfloat ❯

Redis Auth Command

Redis Connection

The Redis Auth command is used to check if the given password matches the password in the configuration file.

Syntax

The basic syntax for the redis Auth command is as follows:

redis 127.0.0.1:6379> AUTH PASSWORD

Available Versions

= 1.0.0

Return Value

Returns OK if the password matches, otherwise returns an error.

Example

redis 127.0.0.1:6379> AUTH PASSWORD
(error) ERR Client sent AUTH, but no password is set
redis 127.0.0.1:6379> CONFIG SET requirepass "mypass"
OK
redis 127.0.0.1:6379> AUTH mypass
OK

Redis Connection

❮ Keys Pttl Strings Incrbyfloat ❯