stop mongodb creating dbs and collections dynamically

前端 未结 3 1814
南方客
南方客 2021-01-11 10:58

Is there a way to switch off the ability of mongo to sporadically create dbs and collections as soon as it sees one in a query. I run queries on the mongo console all the ti

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-11 11:38

    No, implicit creation of collections and DBs is a feature of the console and may not be disabled. You might take a look at the security/authorization/role features of 2.6 and see if anything might help (although there's not something that exactly matches your request as far as I know).

    I'd suggest looking through the MongoDB issues/bug/requests database system here to and optionally add the feature request if it doesn't already exist.

提交回复
热议问题