Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Redis Connection

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 via password authentication 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 table below lists the basic redis connection commands:

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