flask运行时出现如下图错误(redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connectio)

 

flask运行时出现如下图错误(redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connectio)

原因是redis数据库没开,开启redis数据库就行。home目录下敲命令redis-server就ok了!

如果不行就cd redis-4.0.8/,然后cd src,在src下敲  ./redis-server,如下图

flask运行时出现如下图错误(redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connectio)

我的已经开启了,显示第二个红箭头。开启过后就能访问了。

flask运行时出现如下图错误(redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connectio)