【Redis】ERR Client sent AUTH, but no password is set

项目启动报错:ERR Client sent AUTH, but no password is set

原因分析:客户端设置了auth认证,但没设置密码

解决方案:在redis的配置文件 redis.windows.conf 中找到 requirePass ,设置密码redis。

还有一种问题:明明在redis.windows.conf中设置了密码,而且redis还启动了,为什么说没有密码呢:

因为window下启动redis有多种方法,比如:

 .\redis-server.exe

这种方法启动不会带上你的 redis.windows.conf配置文件启动,因此报错没有密码。

还有一种启动方式:

 .\redis-server.exe .\redis.windows.conf

使用这种方式启动时,会带上配置文件redis.windows.conf ,就不会报没有密码的错误了。

清理redis缓存:

redis-cli -p 6379 -a redis
keys
key *id*
del 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 报错信息"ERR Client sent AUTH, but no password is set"表示Redis服务器没有设置密码,但是客户端却发送了带有密码的AUTH请求,导致报错。解决这个问题有两种方式:一种是通过命令行方式设置密码,另一种是在配置文件中去掉密码的设置。\[2\]如果选择通过命令行方式设置密码,可以使用命令"CONFIG SET requirepass yourpassword"来设置密码,将"yourpassword"替换为你想要设置的密码。如果选择在配置文件中去掉密码的设置,可以将配置文件中的"password"一行去掉,即不再设置密码。\[3\] #### 引用[.reference_title] - *1* *2* [Redis连接报错:ERR Client sent AUTH, but no password is set](https://blog.csdn.net/u014026084/article/details/105767907)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [redis连接错误:ERR Client sent AUTH, but no password is set解决方案2个](https://blog.csdn.net/quanaianzj/article/details/84621743)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值