Skip to content

Instantly share code, notes, and snippets.

@cnmoro
Created December 6, 2019 13:19
Show Gist options
  • Save cnmoro/e45d366ce0e3866f32ee71a025f65e61 to your computer and use it in GitHub Desktop.
Save cnmoro/e45d366ce0e3866f32ee71a025f65e61 to your computer and use it in GitHub Desktop.
MongoDB Create ReadOnly
db.createUser(
{
user: "USR",
pwd: "PASS",
roles: [
{ role: "read", db: "DB1" },
{ role: "read", db: "DB2" },
{ role: "read", db: "DB3" }
]
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment