db.auth() | Authenticates a user to a database.对数据库中的用户进行身份验证。 |
db.changeUserPassword() | Changes an existing user's password.更改现有用户的密码。 |
db.createUser() | Creates a new user.创建新用户。 |
db.dropUser() | Removes a single user.删除单个用户。 |
db.dropAllUsers() | Deletes all users associated with a database.删除与数据库关联的所有用户。 |
db.getUser() | Returns information about the specified user.返回指定用户的信息。 |
db.getUsers() | Returns information about all users associated with a database.返回与数据库关联的所有用户的信息。 |
db.grantRolesToUser() | Grants a role and its privileges to a user.向用户授予角色及其权限。 |
db.removeUser() | Deprecated. Removes a user from a database.已弃用。从数据库中删除用户。 |
db.revokeRolesFromUser() | Removes a role from a user.从用户中删除角色。 |
db.updateUser() | Updates user data.更新用户数据。 |
passwordPrompt() | Prompts for the password as an alternative to specifying passwords directly in various mongosh user authentication/management methods.提示输入密码,作为在各种mongosh用户身份验证/管理方法中直接指定密码的替代方法。 |