Redis 連線

Redis 連線

Redis 連線命令主要是用於連線 redis 服務。

例項

以下例項演示了客戶端如何通過密碼驗證連線到 redis 服務,並檢測服務是否在執行:

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

Redis 連線命令

下表列出了 redis 連線的基本命令:

序號命令及描述
1AUTH password
驗證密碼是否正確
2ECHO message
列印字串
3PING
檢視服務是否執行
4QUIT
關閉當前連線
5SELECT index
切換到指定的資料庫