1. 程式人生 > >連線到redis server的兩種方法

連線到redis server的兩種方法

使用telent或者redis-cli連結遠端redis

telnet  192.168.1.100 6666

          redis-cli -h 192.168.1.100 -p 6666

這裡列出redis-cli的幾個引數

用法:redis-cli [OPTIONS] [cmd [arg [arg ...]]]

-h <主機ip>,預設是127.0.0.1

-p <埠>,預設是6379

-a <密碼>,如果redis加鎖,需要傳遞密碼

--help,顯示幫助資訊