On this page本页内容
dropUser
¶Removes the user from the database on which you run the command. The dropUser
command has the following syntax:语法如下所示:
The dropUser
command document has the following fields:
dropUser |
string | The name of the user to delete. You must issue the dropUser command while using the database where the user exists. |
writeConcern |
document | writeConcern document takes the same fields as the getLastError command. |
comment |
any |
A comment can be any valid BSON type (string, integer, object, array, etc).
|
Before dropping a user who has the userAdminAnyDatabase
role, ensure you have at least another user with user administration privileges.