Reference Document: Http://www.cnblogs.com/zengen/archive/2011/04/23/2025722.html
After MongoDB is deployed to Windows, the default is no permission limit. Enter the MONGO platform test as shown in: How do you set up the database for security purposes? Go to the Discoverable Admin library and go to the System.users table, which is equivalent to the user table in MySQL, which is used to store the Super administrator. We create a Super admin db.adduser ("test", "Test") here, but now we can still view it with the name show collections, which indicates that our user rights settings have not yet worked. Then let's go on! Locate the MongoDB node in the registry to modify: D:\mongodb\bin\mongod.exe--dbpath D:\mongodb\data--logpath D:\mongodb\log\mongodb.log-auth --service. Note: Enter the system registry (Win+r-->regedit) to locate the [hkey_local_machine-->system-->currentcontrolset-->services--> MongoDB] Click "ImagePath" in the right-value list to make changes. Restart the MongoDB service. Note: (win+r-->service.msc) Find MongoDB reboot to enter MONGO operation platform again: Show DBS Discovery worked. Then how do we enter the database operation, we have to enter the admin library, through the Admin library authorization to operate other libraries. (See the reference documentation for specific reasons). Use Admin->db.auth ("Test", "test"). You can now authorize the identity operation.
MongoDB Password settings (Windows-based)