(一)报错前提

写flask 项目的时候,因为连接了私有云中的redis地址指定了IP host,启动项目的时候报错

(二)解决方法

首先要切换到root用户

root@:/etc/redis# pwd
/etc/redis
root@:/etc/redis# vim redis.conf

(1) 注释bind 127.0.0.1 ::1
(2)redis默认不是守护进程方式,yes守护进程,所以设变设置no
daemonisz no
(3)保护模式设置 no
protect-mode no
(4)重启redis
root@:/etc/redis# redis-server
(5)进入redis客户端
root@:/etc/redis# redis-cli

相关文章:

  • 2021-09-25
  • 2021-07-11
  • 2022-12-23
  • 2021-10-31
  • 2021-05-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2021-12-28
  • 2021-08-25
  • 2021-08-14
  • 2021-12-21
相关资源
相似解决方案