连接Redis报错:connect timed out

连接Redis报错:connect timed out

1、将redis.conf配置文件中的bind 127.0.0.1注释掉,此处限制可以链接redis的ip
连接Redis报错:connect timed out_第1张图片
2、如果上一个方法不行,就应该是Linux的防火墙的问题了
我这里用的是CentOS 7,在CentOS 7中默认使用firewall做为防火墙,下面是启动&关闭防火墙的命令:

// 启动firewall
systemctl start firewalld.service
// 关闭firewall
systemctl stop firewalld.service

你可能感兴趣的:(redis)