英文:
Create user/password Redis V5
问题
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.
英文:
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
得分: 1
以下是翻译好的部分:
"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"
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论