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

redis-py的demo报错,Error 111.Connection refused

热度:698   发布时间:2016-05-05 08:19:43.0
redis-py的demo出错,Error 111...Connection refused.
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-cli尝试登陆
  相关解决方案