user is not allowed to create a database mongo 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" ]
}
)