Environment: Redis installed on virtual machine Centos6.5 system
Remote connection via Java
Problem One: Error connected refused
redis.conf Comment out #bind 127.0.0.1
Question two: Still unable to connect, error: DENIED Redis
DENIED Redis isRunninginchProtected mode because protected mode isEnabled, no bind address was specified, no authentication password isrequested to clients. In this mode connections is only accepted fromThe loopback interface. If you want to connect fromexternal computers to Redis-adopt one of the following solutions:1) Just disable protected mode sending the command'CONFIG SET Protected-mode no' fromThe loopback interface by connecting to Redis fromThe same host the server isRunning, however make sure Redis is notPublicly accessible fromInternetifYou . Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, andSetting the protected Mode option to'No', andThen restarting the server.3) If You started the server manually just forTesting, restart it with the'--protected-mode No'option.4) Setup a bind addressorAn authentication password. Note:you need to do one of the above thingsinchOrder forThe server to start accepting connections fromThe outside.
Four solutions are available, the simplest of which is to modify redis.conf, comment #protected-code No
win8.1 remote connection to the Redis database