简体   繁体   中英

Redis-cli with password

I am using redis and trying to open CLI of redis using this:

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

and getting and error :

(error) NOAUTH Authentication required

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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