redis.exceptions.ConnectionError: Error 111 connecting to x.x.x.x:6379. Connection
python连接redis报错“redis.exceptions.ConnectionError: Error 111 connecting to x.x.x.x:6379. Connection ”!
1.在redis服务器查询开启服务:
2.redis只开启的127.0.0.1IP地址,显然是配置文件出现了问题;
3.修改redis配置文件“vi /usr/local/bin/redis_conf/redis.conf”
4.
5.重启redis服务“ /usr/local/bin/redis-server /usr/local/bin/redis_conf/redis.conf”
6.查看启动服务端口“netstat -tlunp |grep 6379”
7.服务开启成功
8.使用python进行连接
连接成功...
9.问题搞定