找到redis.conf配置文件检查Redisbind地址是否设置本地。vim redis.conf注释掉redis
bind 127.0.0.1 改为 #bind 127.0.0.1
修改行vim
protected-mode yes 改为 protected-mode no
最后检查防御墙是否开启,或者对应的6379端口是否开放。ide