Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Redis connection


May 16, 2021 Redis


Table of contents


Redis connection

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

Instance

The following example demonstrates how a client connects to the redis service through password verification and detects if 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 connections:

Serial number Commands and descriptions
1 AUTH password
Verify that the password is correct
2 ECHO message
Print the string
3 Ping
See if the service is running
4 QUIT
Close the current connection
5 SELECT index
Switch to the specified database