Connection error: Connection refused
出现该错误的原因是未开启远程连接,将本地ip注释掉:

Connection error: The remote host closed the connection
出现该错误的原因是,需要关闭安全模式,才可运行其他ip访问:

当打开redis服务器后还出现上面·Connection error: The remote host closed the connection错误的原因是开启方式不对
不能直接开启redis服务,要通过后台开启服务,例如:

直接通过redis-server开启的redis服务

依然无法远程连接。
当我停掉前台开启采用后台开启时redis-server redis.conf

就可以远程连接了,如下:

由于我是用的虚拟机,在本地的服务,如果是服务器还要在安全组中开启6379端口,如果安装了宝塔也要在宝塔中开启端口。
在连接窗口的右下方区域可以查看报错做相应修改:

NOAUTH Authentication required.

出现该错误的原因是因为没有用密码登陆认证,需要先输入密码。
auth "password"

ERR invalid password
输入密码错误导致
ERR Client sent AUTH, but no password is set
表示未设置密码,打开配置文件设置一下密码即可。



![复习 [kuangbin带你飞]专题5 并查集](https://img-blog.csdnimg.cn/57085ff46f874677bdcccad358dd6d13.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAQ29taW5nIExpdQ==,size_20,color_FFFFFF,t_70,g_se,x_16)















