当前位置:   article > 正文

【redis】解决redis连接错误:ERR Client sent AUTH, but no password is set_: err client sent auth, but no password is set

: err client sent auth, but no password is set

一.问题场景

java项目启动之后,报ERR Client sent AUTH, but no password is set,就是需要认证。

二.问题排查

在yml文件里,我的redis配置有password属性,但是没有值,这就是问题所在
在这里插入图片描述

三.解决方法

①去掉password这个属性

②给redis配置密码,配置密码:在redis安装目录下的 redis.conf文件redis.windows.conf文件进行密码配置。

四.配置密码

注意:配置的时候别忘了去掉前面的 # 号,如果你配置的是 redis.windows.conf,需要在redis安装文件夹cmd启动。

redis-server.exe  redis.windows.conf   //这就是启动redis让redis.windows.conf成为配置文件

requirepass 你的密码
  • 1
  • 2
  • 3

在这里插入图片描述

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号