MongoDB Security Configuration

Source: Internet
Author: User

0. for MongoDB installed by default, you need to add security configurations.

1.

Disable MongoDB Service

Modify MongoDB service:

Open regedit: HKEY_LOCAL_MACHINE/system/controlset001/services/MongoDB

Modify ImagePath to E: \ MongoDB \ mongodb2.4.3 \ bin \ mongod.exe -- logpath E: \ MongoDB. log -- dbpath E: \ MongoDB \ data -- directoryperdb -- service-auth.

2. Start the MongoDB Service

3. Use Admin

DB. adduser ('sa ', 'sa ')

// Create a superuser

DB. Auth ('sa ', 'sa') // enter

Use ndap

DB. adduser ('reader', 'reader', true) // create a read-only account

Reference: http://blog.csdn.net/cppbegginer/article/details/6940681

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.