how to authenticate user in mongodb


Authenticate the admin user identity after passing through the mongo shell


use admin


auth(<username>, <password>) : Allow users to authenticate to the database from within the shell.


Was this helpful?

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.