博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
win8.1远程连接Redis数据库
阅读量:5069 次
发布时间:2019-06-12

本文共 1326 字,大约阅读时间需要 4 分钟。

环境:redis安装在虚拟机Centos6.5系统上

通过java远程连接

问题一:报错 connected refused

redis.conf 注释掉 #bind 127.0.0.1

问题二:还是无法连接,报错:DENIED Redis

DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions:1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.

提供了四种解决方法,最简单的一种就是修改redis.conf,注释 #protected-code no

 

转载于:https://www.cnblogs.com/wangwanchao/p/5801143.html

你可能感兴趣的文章
如何实现手游app瘦身?
查看>>
linux程序设计---序
查看>>
【字符串入门专题1】hdu3613 【一个悲伤的exkmp】
查看>>
C# Linq获取两个List或数组的差集交集
查看>>
21.Longest Palindromic Substring(最长回文子串)
查看>>
HDU 4635 Strongly connected
查看>>
ASP.NET/C#获取文章中图片的地址
查看>>
Spring MVC 入门(二)
查看>>
Java处理多人同时读写文件的文件锁处理
查看>>
格式化输出数字和时间
查看>>
页面中公用的全选按钮,单选按钮组件的编写
查看>>
判断文本框输入的文字长度
查看>>
java笔记--用ThreadLocal管理线程,Callable<V>接口实现有返回值的线程
查看>>
Scaling Pinterest - From 0 To 10s Of Billions Of Page Views A Month In Two Years
查看>>
SelectSort 选择排序
查看>>
关于android 加载https网页的问题
查看>>
BZOJ 1047 HAOI2007 理想的正方形 单调队列
查看>>
各种语言推断是否是手机设备
查看>>
这个看起来有点简单!--------实验吧
查看>>
小知识:js如何更改css样式
查看>>