简体   繁体   English

带密码的Redis-cli

[英]Redis-cli with password

I am using redis and trying to open CLI of redis using this:我正在使用 redis 并尝试使用以下命令打开 redis 的 CLI:

$redis-cli -h 127.0.0.1 -p 6379 -a mysupersecretpassword

and getting and error :并得到和错误:

(error) NOAUTH Authentication required (错误)需要 NOAUTH 身份验证

why so ?为什么这样 ?

我的解决方案是将密码放在单引号中,例如:

$redis-cli -h 127.0.0.1 -p 6379 -a 'thisizmy!PASS' 

If you have a '$' in your password then it won't work.如果您的密码中有“$”,则它不起作用。 So set the password without the "$".所以设置没有“$”的密码。

If you have '$' in your password, make sure to enclose the password with single quotes.如果您的密码中有“$”,请确保用单引号将密码括起来。 Then it will work.然后它会起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM