...
- Establish a connection to MongoDB via mongo CLI (see Connect to MongoDB with mongo CLI)
Switch to admin db with
use admin
Use
db.dropUser()
to delete an existing user (see https://docs.mongodb.com/v3.4/reference/method/db.dropUser/)No Format > db.dropUser('TEST_USER') true >
List users with
db.getUsers()
(see List existing users)No Format > db.getUsers() [ { "_id" : "admin.bvq", "user" : "bvq", "db" : "admin", "roles" : [ { "role" : "root", "db" : "admin" } ] } ] >
User
TEST_USER
was deleted successfully (user was created in Create an additional user)