add admin user to mongodb 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" ]
}
)