1、問題
連接遠程redis的命令:
$ redis-cli -h host -p port -a password
今天在服務器上使用上命令連接阿里雲redis的時候,顯示警告信息如下:
Could not connect to Redis at r-2zeclm4fdwos1xewcb.redis.rds.aliyuncs.com:3717: Connection timed out
2、解決方法:依次使用下面兩個命令
$ redis-cli -h host
$ auth password
eg:
redis-cli -h r-2zeclm4fdwos1xewcb.redis.rds.aliyuncs.com
auth *********