How to add a DB Collection and assign admin user to it in MongoDB with Mongo Shell code example
Example: create admin user in mongodb
use admin
db.createUser(
{
user: "username",
pwd: "password",
roles: [ "root" ]
}
)