问题:

解决办法

问题1:redis的配置文件问题

进入redis的目录
[root@redis ~]# cd /opt/apps/redis/   opt apps 是自己创建的文件夹(用于安装redis)
使用vim进入配置文件的修改
[root@redis redis]# vim redis.conf

使用vim编辑器修改bin目录中的redis.conf文件,修改如下三项

bind                     # bind 127.0.0.1 ::1  要注释掉
protected-mode         protected-mode保护模式改为no
daemonize                protected-mode保护模式改为no

第一项:# bind 127.0.0.1 ::1

################################## NETWORK ###################################### By default, if no "bind" configuration directive is specified, Redis listens
# for connections from all available network interfaces on the host machine.
# It is possible to listen to just one or multiple selected interfaces using
# the "bind" configuration directive, followed by one or more IP addresses.
# Each address can be prefixed by "-", which means that redis will not fail to
# start if the address is not available. Being not available only refers to
# addresses that does not correspond to any network interface. Addresses that
# are already in use will always fail, and unsupported protocols will always BE
# silently skipped.
#可以绑定多个ip来连接redis服务端
# Examples:
#
# bind 192.168.1.100 10.0.0.1     # listens on two specific IPv4 addresses
//这个相当于只绑定在服务端本地,也就是说只能在服务端连接redis,进行操作  所以我们要把这个注释掉
# bind 127.0.0.1 ::1              # listens on loopback IPv4 and IPv6
# bind * -::*                     # like the default, all available interfaces

第二项:protected-mode no

# you are sure you want clients from other hosts to connect to Redis
# even if no authentication is configured.
#protected-mode yes 默认保护模式是开启的。其只允许本机的客户端访问,即只允许自己访问自己。但生产中应该关闭,以确保其它客户端可以连接 Redis。
protected-mode no     #把这里面的保护模式yes改成no

第三项daemonize yes

该配置可以控制 Redis 启动是否采用守护进程方式,即是否是后台启动。yes 是采用后台启动。

################################# GENERAL ###################################### By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
# When Redis is supervised by upstart or systemd, this parameter has no impact.
daemonize  yes

问题2 防火墙没有打开6379的端口

第一步:查看VM虚拟机的IP

查看命令是ip addr或是ifconfig

ip addr

ifconfig

第二步 :,测试端口是否畅通

返回Windows,开启cmd,通过telnet命令,测试端口是否畅通(这一步连接不能就ping一下也可以)

如果连接不通:执行以下操作 显示如下

打开控制面板-程序-启动或关闭Windows功能

Telnet客户端”默认是关闭状态;把前面的框打勾

第三步 开启6379端口

如果连接失败,表示CentOS的6379端口没有开启 ping也不行的话


首先输入firewall-cmd --query-port=6379/tcp,
如果返回结果为no,那么证明6379端口确实没有开启。
接着输入
firewall-cmd --add-port=6379/tcp,将6379端口开启,返回success。
最后然后再执行firewall-cmd --query-port=6379/tcp,返回yes,证明端口已经成功开启

开启端口成功之后再用cmd命令重复上述telnet命令一遍,出现小黑框闪烁一下说明连接没有问题。

(这里面如果telnet命令不通 ping通也是可以的)

第四步 开启redis desktop manager(可视化工具)

备注:提个醒在云服务器上安装redis最好设置密码

设置密码和绑定ip,二选一即可,否则redis处于保护模式,只能本虚拟机访问

绑定ip:# bind 127.0.0.1 ::1

关闭保护模式:protected-mode no

成功启动

使用RedisDesktopManager无法连接Redis服务器问题相关推荐

  1. 使用RedisDesktopManager客户端无法连接Redis服务器问题解决办法

    使用RedisDesktopManager客户端无法连接Redis服务器问题解决办法 参考文章: (1)使用RedisDesktopManager客户端无法连接Redis服务器问题解决办法 (2)ht ...

  2. [ 搭建Redis本地服务器实践系列三 ] :图解Redis客户端工具连接Redis服务器

    原文:[ 搭建Redis本地服务器实践系列三 ] :图解Redis客户端工具连接Redis服务器 上一章 [ 搭建Redis本地服务器实践系列二 ] :图解CentOS7配置Redis  介绍了Red ...

  3. 使用IDEA的Redis插件连接Redis服务器

    IDEA中的Redis插件作为Redis的可视化工具,可以通过该插件连接Redis服务器,并并进行增删改查操作. 一.IDEA安装Redis插件 1.点击 File->Setting 2.点击P ...

  4. Windows远程连接Redis服务器

    Windows远程连接Redis服务器 本地安装Redis 找到Redis并启动Redis,放着不用动,千万别关 打开命令行(cmd),移动到Redis的Redis-cli位置(就是你启动server ...

  5. 使用Redis Desktop Manager连接Redis服务器

    1.打开RedisDesktopManager客户端软件,首次打开,连接列表都是空白的,可以点击最下方的"Connect to Redis Server"添加新的redis连接 2 ...

  6. 连接redis服务器提示:Redis Client On Error: Error: connect ECONNREFUSED 127.0.0.1:6379 Config right?

    使用图形化工具连接redis时报错如下: 检查下redis服务是否启动. 启动redis命令: LINUX redis-server WINDOWS redis-server.exe --servic ...

  7. redis连接应用服务器,使用redis-cli连接Redis服务器

    为redis设置密码 编辑redis配置文件,这里的配置为/etc/redis/6379.conf,根据自己的情况而定. vim /etc/redis/6379.conf 找到以#requirepas ...

  8. 连接redis服务器提示:Redis Client On Error Error connect ECONNREFUSED 127.0.0.16380 Config right

    使用图形化工具连接redis时报错如下: 检查下redis服务是否启动. 启动redis命令: LINUX redis-server WINDOWS redis-server.exe --servic ...

  9. 无法连接Redis服务器

    我的原因是: 注释bind 127.0.0.1(注意不要被上方的这个所迷惑) 开放端口号等记得重启防火墙 修改iptables之后记得一定要重启防火墙重启iptables:/etc/init.d/ip ...

最新文章

  1. mysql的总结7--存储过程
  2. 深度学习(三十六)——R-FCN, FPN, RetinaNet, CornerNet
  3. 鸿蒙系统多会发布,华为官宣鸿蒙系统将发布,还将发布多款新品
  4. tcp的3次握手4次挥手
  5. 宝塔修改Nginx服务器类型,宝塔面板nginx更改日志格式的方法
  6. jvm垃圾回收之JVM GC算法
  7. 【Java并发性和多线程】竞态条件与临界区
  8. 《Programming WPF》翻译 第8章 3.Storyboard
  9. 【STM32f401学习之路-02】USART串口通信
  10. RazorSQL Mac(SQL数据库查询工具)含激活码
  11. 大数据技术原理与应用之可视化实训
  12. Gym:102500E:Expeditious Cubing【精度精度】
  13. pe卸载win10更新补丁_win10补丁,小编告诉你如何卸载Win10上已安装的更新补丁
  14. 介绍一种Android 平台 不需要获取imei imsi 无权限就能获取手机运营商的方法
  15. ES关键字排序报错 reason=Fielddata is disabled on text fields by default. Set fielddata=true on 关键字 in order
  16. 微信怎么知道别人删除了你?批量检测方法(建群)
  17. 夏普GP2Y1010AU0F灰尘传感器在STM32平台上的使用
  18. 互联神州CCSP冬季集训班信息
  19. labview求n阶乘的和_LabVIEW小白入门——阶乘
  20. 百度百科怎么创建个人词条?

热门文章

  1. 1666_MIT 6.828 JOS隔离机制的大纲
  2. Linux进程管理(4):进程调度
  3. 利用Python讲多张图片合成PDF文件
  4. 眼动数据分析基础知识了解(人眼工作机制)
  5. 在GD32F103移植STM32F103代码
  6. 2022-05-10:在字节跳动,大家都使用飞书的日历功能进行会议室的预订,遇到会议高峰时期, 会议室就可能不够用,现在请你实现一个算法,判断预订会议时是否有空的会议室可用。 为简化问题,这里忽略会议
  7. TF2.0深度学习实战(一):分类问题之手写数字识别
  8. Intellij IDEA 中如何查看maven项目中所有jar包的依赖关系图
  9. 英雄无敌3 死亡阴影 修改器
  10. 2021最新影视双端APP无加密修复版源码 附详细搭建图文教程