Global Rationality
Global Rationality

Reputation: 145

What built-in MongoDB roles permit a user to create a new databases and users for all databases?

MongoDB's documentation is clear about roles needed for other operations. I may be overlooking something, but I couldn't find a clear description of how to create a new database.

I am trying to do this from a remote Node.js server. One that should be able to create databases and create users.

Upvotes: 1

Views: 37

Answers (1)

Neodan
Neodan

Reputation: 5252

According to the MongoDB documentation you need the dbAdmin and userAdmin roles, but the dbOwner role also can fit your needs (depends on the details of your task). Also you can create a custom role.

Upvotes: 1

Related Questions