Docs HomeMongoDB Compass

Required Access必需的访问权限

MongoDB Compass users require specific privileges to access various Compass features if authentication/authorization is enforced on the connected MongoDB instance.如果在连接的MongoDB实例上强制执行身份验证/授权,MongoDB Compass用户需要特定的权限才能访问各种Compass功能。

The following table lists the privileges required to access the features as well as the built-in roles that can provide these privileges:下表列出了访问功能所需的权限以及可以提供这些权限的内置角色:

Compass ViewCompass视图Capability能力Privilege(s)权限MongoDB Built-In RoleMongoDB内置角色
Home/MongoDB Instance首页/MongoDB实例View performance查看性能dbStats getCmdLineOpts inprog serverStatus topclusterMonitor
DatabaseCreate a Database创建数据库createCollectionreadWrite
DatabaseDrop a Database删除数据库dropDatabasedbAdmin
CollectionCreate a Collection创建集合createCollectionreadWrite
CollectionDrop a Collection删除集合dropCollectionreadWrite
SchemaQuery/View a Schema查询/查看架构findread
DocumentsQuery/View a Document查询/查看文档findread
DocumentsClone, insert, update, delete a document克隆、插入、更新、删除文档find insert update removereadWrite
IndexesView an index查看索引listIndexesread
IndexesCreate, drop an index创建、删除索引createIndex dropIndexreadWrite
Explain PlanQuery/View a query plan查询/查看查询计划findread
ValidationView rules查看规则listCollectionsread
ValidationUpdate rules更新规则collModdbAdmin
Note

The built-in roles may provide more access than required. 内置角色可能提供比所需更多的访问权限。You can also create a User-Defined Roles to grant specific privileges.您还可以创建用户定义的角色来授予特定的权限。