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

  • 问题描述

    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

版权声明:本文为The_Time_Runner原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。