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

  • problem description

    redis-cli is the redis command line interface to interact with the redis service.

  • solution

    1. via configuration file
      $ vi /etc/redis.conf
      # daemonize no 改为 yes
      redis-server /etc/redis.conf
      

      docker startup redis has no configuration file in it. You need to build it yourself.

    2. start directly
      redis-server &
      

      <李>

      引用

      1. 无法连接到127.0.0.1:6379的Redis:使用自制程序拒绝连接