Redis Desktop Manager连接redis发生crash,Could not connect to Redis at 127.0.0.1:6379: Connection refused

时间:2024-03-31 21:26:37

一、Redis Desktop Manager连接redis发生crash

方法一:开启protected mode则必须配置password,并且将允许连接的ip及端口在bind中明确列出

Redis Desktop Manager连接redis发生crash,Could not connect to Redis at 127.0.0.1:6379: Connection refused

方法二:注释redis.conf文件中的:bind 127.0.0.1修改为自己的IP

Redis Desktop Manager连接redis发生crash,Could not connect to Redis at 127.0.0.1:6379: Connection refused

开启redis desktop manager,auth为redis密码,可以设置,也可以不设置,设置密码和绑定ip,二选一即可,否则redis处于保护模式,只能本虚拟机访问。

此时,需要重新制定配置文件重启服务,否则点击 “Test Connection” 之后,提示仍无法连接:

Redis Desktop Manager连接redis发生crash,Could not connect to Redis at 127.0.0.1:6379: Connection refused

二、redis-cli 客户端连接Redis 时报错:Could not connect to Redis at 127.0.0.1:6379: Connection refused

1、找到redis.conf 并修改 daemonize no 为 daemonize yes ,这样就可以默认启动就后台运行

Redis Desktop Manager连接redis发生crash,Could not connect to Redis at 127.0.0.1:6379: Connection refused

2、再次使用配置开启服务

[[email protected] src]# ./redis-server ../redis.conf/

3、连接使用redis    ./redis-cli

4、如果还是报错,则修改redis.conf 把127.0.0.1加上去:bind 192.168.10.130 127.0.0.1(注意空格)

Redis Desktop Manager连接redis发生crash,Could not connect to Redis at 127.0.0.1:6379: Connection refused

 此时,都连接成功。

Redis Desktop Manager连接redis发生crash,Could not connect to Redis at 127.0.0.1:6379: Connection refused

Redis Desktop Manager连接redis发生crash,Could not connect to Redis at 127.0.0.1:6379: Connection refused