1. Start the MongoDB client
/usr/local/mongdb/bin/mongo
2. Switch to admin, and enter the user name and password
> use admin
> db.auth("username","password")
If it returns 1, the login is successful.
/usr/local/mongdb/bin/mongo
> use admin
> db.auth("username","password")
If it returns 1, the login is successful.