I found the redis 6.0+ add the acl, now I want to login use the default user like this:

I have no name!@cruise-redis-master-0:/$ redis-cli -h -a doGT233U7 -u default
Invalid URI scheme

I read the docs but did not find any command login into redis by username and password, what should I do to login the new version of redis above 6.0+?

1 Answer 1


There are two options:

Full URL

Provide the username and password in a connection string URL with the -u flag:

./redis-cli -u redis://<username>:<password>@<host>[:port]

This isn't very secure though (e.g. leaves the password in command history) so you'll get the following warning:

Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.

AUTH command

The more secure method is to log in without any authentication and then execute the AUTH command within the CLI.

./redis-cli -h <host> [-p <port>]
AUTH [username] <password> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.