Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

my question is - is it possible to define user in the Mongo database who will be able to drop the database? Maximum user privilege is "dbAdmin" but that privilege doesn't allow users to drop the database, only collections can be dropped.

I know that "clusterAdmin" has rights to drop the database, but that role can't be defined in regular database, only in admin database...

share|improve this question

migrated from stackoverflow.com Jul 4 '13 at 13:55

This question came from our site for professional and enthusiast programmers.

1 Answer 1

No, it is not currently possible (in version 2.4) to create such a user/permission.

Permissions on a specific database grant permissions on entities contained in that database, but not on the database itself. Cluster level permission is needed to create or drop databases.

Reference: http://docs.mongodb.org/manual/reference/user-privileges/#database-administration-roles

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.