Docs Menu

Docs HomeMongoDB Manual

db.removeUser()

On this page

  • Definition

Deprecated since version 2.6: Use db.dropUser() instead of db.removeUser()

db.removeUser(username)

Removes the specified username from the database.

The db.removeUser() method has the following parameter:

Parameter
Type
Description
username
string
The database username.
←  db.grantRolesToUser()db.revokeRolesFromUser() →

On this page

Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.