Redis command o...login
Redis command operation Chinese manual
author:php.cn  update time:2022-04-12 14:07:28

Redis connection


The Redis connection command is mainly used to connect to the redis service.

Example

The following example demonstrates how the client connects to the redis service through password verification and detects whether the service is running:

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

Redis connection command

The following table lists the basic commands for redis connection:

Serial numberCommand and description
1AUTH password
Verify whether the password is correct
2ECHO message
Print string
3PING
Check whether the service is running
4QUIT
Close the current connection
5SELECT index
Switch to the specified database

php.cn