(20200916 Solved)Docker||redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused

严欣怡
2023-12-01
  • 问题描述

    redis-cli is the Redis command line interface, 用来与Redis服务进行交互,如题是因为Redis服务尚未启动。

  • 解决方案

    1. 通过配置文件
      $ vi /etc/redis.conf
      # daemonize no 改为 yes
      redis-server /etc/redis.conf
      

      docker启动redis里面没有配置文件。需要自己建。

    2. 直接启动
      redis-server &
      
  • References

  1. Could not connect to Redis at 127.0.0.1:6379: Connection refused with homebrew
 类似资料: