MongoDB Password settings (Windows-based)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.