当前位置: 代码迷 >> 其他数据库 >> redis-py的demo疏失,Error 111.Connection refused
  详细解决方案

redis-py的demo疏失,Error 111.Connection refused

热度:824   发布时间:2016-05-05 08:24:07.0
redis-py的demo出错,Error 111...Connection refused.
本帖最后由 flamkuavos 于 2013-02-02 12:48:38 编辑
redis安装完毕,linux,python3.2,然后测试了如下小demo,居然报错:redis.exceptions.ConnectionError: Error 111 connecting localhost:6379. Connection refused.
import redis
r = redis.StrictRedis(host='localhost', port=6379, db=0)
r.set('foo', 'bar')
r.get('foo')


请问谁知道怎么办?谢谢.
redis python

------解决方案--------------------
具体是怎么解决的?
------解决方案--------------------
先用redis-cli尝试登陆
  相关解决方案