I have a MongoDB that has the regular authentication setup so you need a username and password to connect to the database (auth=true
in the configs). The problem I'm running in to is that I have some scripts that need to connect to that database and then create a new one, copy some data over, and later remove the database at some point in time. The issue is that the user for the primary database doesn't seem to be able to create a new one.
I've dug through their documentation but haven't been able to find anything yet. I would liken what I'm looking for to giving a MySQL user the ability to create database
and drop database
.
Best Answer
This looks to need several different privs.
I haven't figured out what you need to create a database, but that right may inherit directly from readWriteAnyDatabase.