Redis无法被远程连接的解决办法

Windows10-启动redis报错: Could not create server TCP listening socket 127.0.0.1:6379: bind: 操作成功完成

解决方案:

运行: redis-cli.exe
执行命令:shutdown
退出:exit
重新启动:redis-server.exe redis.windows.conf

 windows系统下redis无法被远程连接的解决办法

1.修改redis安装目录下的redis.windows-service.conf文件

  2.把查找 bind 127.0.0.1 在前面加个 # 注释掉

#bind 127.0.0.1

3.把protected-mode yes 改成 protected-mode no

protected-mode no

4.修改密码,查找 # requirepass foobared,添加如下命令:requirepass 123456  设置密码为:123456

 

 5.接着重启redis服务

 6.远程连接测试(本地需要安装Redis)

redis-cli -h 192.168.1.1(ip地址) -p 6379(端口号)

7.连接成功!

 

posted @ 2022-03-02 17:06  ice.ko  阅读(2976)  评论(0编辑  收藏  举报