一、連接Redis服務器
redis-cli -h host -p port -a password
二、查詢所有的keys
keys *
三、獲取指定的key對應的值
1)查詢key對應的value
type <key>
2)不同的type,查詢的命令不一樣
if value is of type string -> GET <key> if value is of type hash -> HGETALL <key> if value is of type lists -> lrange <key> <start> <end> if value is of type sets -> smembers <key> if value is of type sorted sets -> ZRANGEBYSCORE <key> <min> <max>