Could not connect to Redis at 127.0.0.1:6379: Connection refused

Posted qixiaohua

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Could not connect to Redis at 127.0.0.1:6379: Connection refused相关的知识,希望对你有一定的参考价值。

启动redis:  redis-server ../redis.conf

技术分享图片

redis启动成功后

执行命令行redis-cli报:Could not connect to Redis at 127.0.0.1:6379: Connection refused错误

技术分享图片

 

那是因为redis安装路径下的redis.conf文件配置未修改:

redis.conf文件中:

将daemonize no 修改为 daemonize yes

技术分享图片

 

再输入 redis-server /usr/local/src/redis-4.0.10/redis.conf

redis-cli

就OK啦!

 

以上是关于Could not connect to Redis at 127.0.0.1:6379: Connection refused的主要内容,如果未能解决你的问题,请参考以下文章

Connecting to 172.16.128.14:22...Could not connec

“psql: could not connect to server: Connection refused” Error when connecting to remote database(示例代

Idea 连接数据库出错Connection to xxx@localhost failed. [08001] Could not create connection to database

Could not connect to Redis at 192.168.0.129:6379: Connection refused

MySql :Could not create connection to database server.

Could not connect to Redis No route to host问题解决