Solution to the problem that RedisDesktopManager cannot connect to redis

Solution to the problem that RedisDesktopManager cannot connect to redis

RedisDesktopManager is a client that connects to the redis database.

When redis cannot be connected, the solution is:

Step 1: Test outside your own machine to see if you can connect to the virtual machine

Open cmd and use ping the virtual machine IP address. If it can ping successfully, it means that it can be accessed from the outside. If it cannot be accessed, you need to turn off the firewall of the virtual machine and the local machine. Command: systemctl stop firewalld

Step 2: Comment out bind 127.0.0.1

In the redis configuration file, comment out bind 127.0.0.1 to ensure that remote connections can be made.

Step 3: Turn off the local protection mode of redis

In the redis configuration file, check whether the local protected mode is turned off. If it is not turned off, remote connections cannot be made. How to turn it off: protected-mode no

Step 4: Check whether a login password has been set

Check whether a login password has been set. Check by: Search requirepass. If it is set, you need to enter the password when logging in. If no password is set, you can log in directly through background login.
Insert image description here

Step 5: Perform a background test first to see if you can successfully log in to the redis database.

(1) Restart the redis service.
Use ps -aux|grep redis to find the redis service, use the kill process ID to kill it, load the modified configuration file and restart the redis service, command: src/redis-server redis.conf

(2) Background login to redis test.
Switch to the src directory and use redis-cli -a 123456 (set a password to write, just use ./redis-cli to log in without setting a password) to log in to the redis database.

Step 6: Use RedisDesktopManager to connect to the redis database

Insert image description here

Step 6: If it is a virtual machine on the server, you need to configure a security group (equivalent to a firewall)

Develop port 6379
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_45961836/article/details/134336754