Redis - Could not connect to Redis at 127.0.0.1:6379: Could not connect because the target machine actively refused.

Today Redis got the error "Could not connect to Redis at 127.0.0.1:6379: Unable to connect because the target computer actively refused"!

insert image description here

When I think about it, when I was using redis-server, I just clicked the × number!

Solution! !

  1. Do not close after entering the command redis-server.exe redis.windows.conf.

    redis-server.exe redis.windows.conf
    

    insert image description here

  2. Reopen the cmd window and enter redis-cli.exe -h 127.0.0.1 -p 6379.

    redis-cli.exe -h 127.0.0.1 -p 6379
    

    insert image description here

That's it! ! !

Guess you like

Origin blog.csdn.net/qq_43779149/article/details/123435727