Redis 简明教程
Redis - Connections
Redis 连接命令主要用于管理客户端与 Redis 服务器之间的连接。
Redis connection commands are basically used to manage client connections with Redis server.
Example
下面的示例说明客户端如何向 Redis 服务器验证它自己并检查服务器是否在运行。
Following example explains how a client authenticates itself to Redis server and checks whether the server is running or not.
redis 127.0.0.1:6379> AUTH "password"
OK
redis 127.0.0.1:6379> PING
PONG
Redis Connection Commands
下表列出了一些与 Redis 连接相关的基本命令。
Following table lists some basic commands related to Redis connections.
Sr.No |
Command & Description |
1 |
AUTH passwordAuthenticates to the server with the given password |
2 |
ECHO messagePrints the given string |
3 |
PINGChecks whether the server is running or not |
4 |
QUITCloses the current connection |
5 |
SELECT indexChanges the selected database for the current connection |