What if I've forgotten the MongoDB admin password?

Responsive Ad Header

Question

Grade: Education Subject: Support
What if I've forgotten the MongoDB admin password?
Asked by:
50 Viewed 50 Answers

Answer (50)

Best Answer
(372)
If you've forgotten the admin password, you'll need to restart the MongoDB server in single-user mode *without* authentication. This allows you to connect as a privileged user without credentials and reset the password. The exact steps depend on your operating system and MongoDB version. Consult the official MongoDB documentation for instructions specific to your setup.