WIN10 installing MongoDB and configuring it as a service

Source: Internet
Author: User
Tags auth

Well, today I suddenly found out that the newly bought surface didn't have MongoDB installed, and then thought about installing it, by the way, though the installation process was simple.

One: Download the installation, and then copy to the C packing directory, this is not much to say, than QQ is simple.

Two: Copy the bin folder to the MongoDB directory, then create a data folder in the root directory to hold the log and database, then the Data folder to build a DB and log folder, and the log folder under the new Mongolog.log, as shown in the following image:

Three: In the MongoDB root directory, see a configuration file, the content is as follows:

Dbpath=C:\MongoDb\data\dblogpath=c:\MongoDB\data\log\mongolog.loglogappend=true  Auth=false

This is the contents of the Mongodb.config file, auth default to False, no password authentication

Four: PowerShell administrator mode navigates to the bin directory and then runs

. \mongod--config c:\MongoDB\mongodb.config--servicename MongoDB--install

In this way, the service is installed, and then in the service that block right-click Start service, so MongoDB even if installed, next to set the password

Five:

Use admindb.createuser ({User:"sa", pwd:"123456", Roles:[{role:"root", DB:"admin"}]})

Change the config file's auth=false to true and restart the service.

WIN10 installing MongoDB and configuring it as a service

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.