Create user/password Redis V5

4.2k Views Asked by At

I need to create a new user on REDIS V5 and assign a password. This is for application connect.

I only have the requirepass on redis.conf. But this password is only for me and i don't share it.

I don't have ACL.

Thanks Regards. Hernán.

I'm expecting a new user for the applications connect

1

There are 1 best solutions below

0
Ankit Sahay On

Since you have not provided with what access you want the user to be created, here is a sample command that will create a user "myuser" with a password of "mypassword" which will have access to all commands except the commands that are tagged as "dangerous"

acl setuser myuser on >mypassword +@all -@dangerous ~*

When you run this command in redis-cli, this user gets created and it's information is stored in memory, so you will want to persist this data in a file so that it doesn't get lost when redis is restarted. You can do so by running:

ACL SAVE