redis连接 “ERR Client sent AUTH, but no password is set

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chinafire525/article/details/84106719

[问题原因]
Redis服务器没有设置密码,但客户端向其发送了AUTH(authentication,身份验证)请求。

【解决办法】

确定Redis启动时指定是哪个配置文件。

redis.conf

编辑完后保存,重新启动Redis,再运行程序,OK。

另外:关于redis的启动方式:

1、指定配置文件 $: ./redis-server /usr/local/redis.conf

2、不指定配置:$: ./redis-server &

不指定配置文件启动时采用默认配置,无密码

redis通过属性requirepass 设置访问密码,但没有设置该属性时,客户端向服务端发送AUTH请求,服务端就好返回异常:ERR Client sent AUTH, but no password is set
 

猜你喜欢

转载自blog.csdn.net/chinafire525/article/details/84106719
今日推荐