use <your database>
db.createUser({
user: '<some username>',
pwd: passwordPrompt(),
roles: [{
role: 'readWrite',
db: '<your database>'
}]
})
db.createUser(
{
user: "user_name",
pwd: "password",
roles: [
"userAdminAnyDatabase",
"dbAdminAnyDatabase",
"readWriteAnyDatabase"
]
}
)
use admin
db.createUser({
user: "username",
pwd: "password",
roles: [ "root" ]
})
use admin
db.createUser(
{
user: "restricted",
pwd: passwordPrompt(), // Or "<cleartext password>"
roles: [ { role: "readWrite", db: "reporting" } ],
authenticationRestrictions: [ {
clientSource: ["192.0.2.0"],
serverAddress: ["198.51.100.0"]
} ]
}
)
$./ngrok authtoken 1wRMoKMbCsqnfcXAf6kgexZciJz_5NEUUotaKvZkFXjykV9rJ