Redis Connection: AUTH password
Description
Redis AUTH command is used to authenticate a password-protected server with a given password. If provided password matches the password in the configuration file, the server replies with the OK status code and starts accepting commands. Otherwise, an error is returned and the clients need to try a new password.
Syntax:
Basic syntax of redis AUTH command is shown below:
AUTH PASSWORD
Available since
1.0.0.
Return Value
String reply
Return Value Type
String
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
Previous:
SCRIPT LOAD
Next:
ECHO
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework