Use the RedisDesktopManager tool to solve the problem of connection failure

Today, I built the redis environment on the cloud server. I want to use the RedisDesktopManager tool to connect it. The result is that I can't connect. The following figure is displayed:

 

 

I made sure the server firewall is off, and set the requirepass password in the redis config file, but it still fails. You can also ping the server ip address from your computer.

I just took a look at the redis.conf file. The reason is written at the beginning:

 

################################## NETWORK #####################################

# By default, if no "bind" configuration directive is specified, Redis listens
# for connections from all the network interfaces available on the server.
# It is possible to listen to just one or multiple selected interfaces using
# the "bind" configuration directive , followed by one or more IP addresses.
#
# Examples:
#
# bind 192.168.1.100 10.0.0.1          This tells us that we can bind multiple IPs to connect to the redis server
# bind 127.0.0.1 ::1
#
# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the #
internet, binding to all the interfaces is dangerous and will expose the  We did not comment the bind directive below

# instance to everybody on the internet. So by default we uncomment the        bind 127.0.0.1 This is equivalent to binding only locally on the server, that is to say, you can only connect to redis on the server and operate

# following bind directive, that will force Redis to listen only into
# the IPv4 lookback interface address (this means Redis will be able to
# accept connections only from clients running into the same computer it
# is running).
#
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES    如果你想要开放所有ip接口,注释下面这行
# JUST COMMENT THE FOLLOWING LINE.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#bind 127.0.0.1

 

Just comment bind 127.0.0.1 directly, restart it to make the configuration take effect, and then make a remote connection and it will be ok:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324979063&siteId=291194637