mongodb create any write database user code example
Example: create admin user in mongodb
use admin
db.createUser(
{
user: "username",
pwd: "password",
roles: [ "root" ]
}
)
use admin
db.createUser(
{
user: "username",
pwd: "password",
roles: [ "root" ]
}
)