简体   繁体   中英

Delete keys with pattern in redis having redis-cli password

How to delete keys with pattern having redis-cli password?

Records i needs to remove:

redis-cli -p 6379 -a password KEYS "/st_files/281/*" | wc -l
9

I want to remove the values under /st_files/281/* Which has count 9.

My redis setup has password.

Redis version is 3.2.3
I tried:

redis-cli -p 6379 -a pssword KEYS "/st_files/281/*" | xargs redis-cli DEL

Result is:

(error) NOAUTH Authentication required.

Password i entered is the correct one.

尝试:

redis-cli -a pssword KEYS "/st_files/281/*" | xargs redis-cli -a pssword DEL

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