Skip to content

Instantly share code, notes, and snippets.

@lpsm-dev
Last active December 27, 2021 22:26
Show Gist options
  • Save lpsm-dev/acb1eef10f8a1ca4146f7224949464b3 to your computer and use it in GitHub Desktop.
Save lpsm-dev/acb1eef10f8a1ca4146f7224949464b3 to your computer and use it in GitHub Desktop.
[Database] - Create User Read Only Policy in MongoDB πŸš€
use database
db.createUser(
{
user: "validation",
pwd: "123456",
roles: [{role: "read", db: "ato"}]
}
)
@lpsm-dev
Copy link
Author

Create User in MongoDB

This is a simple setup used to create a user in MongoDB. Enjoy πŸ˜„!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment