用 Redis Desktop Manager 远程连接 redis 数据库。

环境:

本机OS:window 10(本机没有安装redis)

redis 服务器:centos 7

使用 Redis Desktop Manager 工具远程连接 redis。

Redis Desktop Manager 下载地址:https://redisdesktop.com/ 针对windows下,已经不提供免费下载,可以尝试其他版本。

连接注意三点即可。

一、虚机防火墙是否关闭。

systemctl status firewalld

如果防火墙是active,可以关闭或者添加例外。

我选择永久关闭:systemctl disable firewalld(即开机不启动)

二、6379端口是否开放。

查看端口:firewall-cmd --query-port=6379/tcp

打开端口:firewall-cmd --add-port=6379/tcp --permanent (--permanent永久生效,没有此参数重启后失效)

三、redis.conf配置文件修改

vi /etc/redis/redis.conf vi /etc/redis/redis.conf
61 # bind 127.0.0.1 #注释此行代码 61 # bind 127.0.0.1 #注释此行代码
80 protected-mode no #将yes改为no 80 protected-mode no #将yes改为no
reboot即可 reboot即可
说明:redis.conf文件上说用  说明:redis.conf文件上说用
/usr/local/bin/redis-server /etc/redis/redis.conf /usr/local/bin/redis-server /etc/redis/redis.conf
这样可以解决,但是我试了,貌似没用。 这样可以解决,但是我试了,貌似没用。
reboot即可 说明:redis.conf文件上说用 /usr/local/bin/redis-server /etc/redis/redis.conf 这样可以解决,但是我试了,貌似没用。
环境: 本机OS:window 10(本机没有安装redis) redis 服务器:centos 7 使用 Redis Desktop Manager 工具远程连接 redis。 Redis Desktop Manager 下载地址:https://redisdesktop.com/ 针对windows下,已经不提供免费下载,可以尝试其他版本。 连接注意三点即可。 一、虚机防火墙是否关闭。 systemctl status firewalld 如果防火墙是active,可以关闭或者添加例外。 我选择永久关闭:systemctl disable firewalld(即开机不启动) 二、6379端口是否开放。 查看端口:firewall-cmd --query-port=6379/tcp 打开端口:firewall-cmd --add-port=6379/tcp --permanent (--permanent永久生效,没有此参数重启后失效) 三、redis.conf配置文件修改 vi /etc/redis/redis.conf 61 # bind 127.0.0.1 #注释此行代码 80 protected-mode no #将yes改为no reboot即可 说明:redis.conf文件上说用 /usr/local/bin/redis-server /etc/redis/redis.conf 这样可以解决,但是我试了,貌似没用。
经验分享 程序员 微信小程序 职场和发展