Simple configuration of MongoDb under Windows

Source: Internet
Author: User
Tags auth custom name

start cmd with AdministratorEnter the installation directory               input: Mongod--auth--port 3406--dbpath= Library address--logpath= full address--install--servicename "Custom Name"Note:The library address can be specified only to the folder, the log address must be specified to the specific file--auth enable power root control--port Specifying Ports--IP Specifies that the IP is not specified as local--serviceName Windows service nameafter completion of the aboveEnter the address and Port connection library for the previous step configuration:                 Switch to admin                 Create a Super Admin account: Restart Service: Login with the user you just created: Db.auth ("root002", "root002") Displaying 1 indicates that the login was successful. You can also create users for the specified library:Db.createuser ({User: "read",pwd: "read",roles:[{role: "read", DB: "Custom"}]}) MongoDB's built-in role:database User role: Read, ReadWritedatabase Management roles: DbAdmin, Dbowner, UseradminAdministrators group for the entire system management: Clusteradmin, Clustermanager, Clustermonitor, HostmanagerBackup Restore Role Group: backup, Restoreall database roles: Readanydatabase, Readwriteanydatabase, Useradminanydatabase, DbadminanydatabaseSuper admin: Root, (Dbowner, useradmin, useradminanydatabase These role roles provide any user's ability to any data, and users who have this role can define their own permissions on any database) internal role, generally not recommended setting: __system

Simple configuration of MongoDb under Windows

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.