若连接redis时报错:Redis (error) NOAUTH Authentication required.,通常是由于redis设了密码但连接时却未提供密码引起的。
设置密码:
编辑redis配置文件redis.conf,(在/etc/redis/redis.conf或/etc/redis.conf)
加入:
requirepass yourpassword然后 systemctl restart redis
redis-cli 中使用密码:
$ redis-cli
127.0.0.1:6379> auth yourpassword
OK
127.0.0.1:6379> 原文:https://www.cnblogs.com/dylanchu/p/10230303.html