Redis Connection

Redis connection commands are mainly used to connect to the Redis service.

Example

The following example demonstrates how a client connects to the Redis service through password verification and checks whether the service is running:

redis 127.0.0.1:6379> AUTH "password"
OK
redis 127.0.0.1:6379> PING
PONG

Redis Connection Commands

The following table lists the basic Redis connection commands:

No.Command and Description
1AUTH password
Verify whether the password is correct
2ECHO message
Print a string
3PING
Check whether the service is running
4QUIT
Close the current connection
5SELECT index
Switch to the specified database
Other Extensions