Removes all users from the database on which you run the command.
dropAllUsersFromDatabaseremoves all users from the database.
dropAllUsersFromDatabasecommand has the following syntax:
dropAllUsersFromDatabasedocument has the following fields:
Field Type Description
1to drop all the users from the current database.
document Optional. The level of write concern for the removal operation. The
writeConcerndocument takes the same fields as the
The following sequence of operations in the
mongo shell drops every user from the
n field in the results document shows the number of users removed: