Installing MongoDB in Windows

Source: Internet
Author: User
Tags mongo shell

1. Purpose

The question is so simple that I think I should write an article for a long time, but for starters, anything that hasn't been touched is likely to be a stumbling block, so this blog is designed to keep track of the road, not the level.

2. Download

Baidu or Google search ' mongodb ' keyword, and then find and open the official dot click to open the link, click on the right to download MongoDB, until the end of this article, no 64-bit version of the Windows, So download the MSI installation package, whether you click 64-bit or 32-bit versions of Windows to download the 32-bit version. The other one is the URL of MongoDB native driver 1.x: Click to open the link

3. Installation

Run the installation package directly and install to the default path, which should be the C:\Program Files\mongodb 2.6 standard directory.

4. Direct start

Run the console, CD-to-C:\Program FILES\MONGODB 2.6 standard\bin Path, and then run the following:

>mongod--dbpath D:\MongoDB

Note that the following path should be all in English, preferably not Chinese characters

Run the shell command line if you want to start MongoDB

>mongo

5.bat Boot

Every time I enter a directory of C-drive to start MongoDB by running the console, it feels more troublesome, so we can write a startup script

As follows:

C \ "program Files" \ "MongoDB 2.6 standard" \bin\mongod--dbpath D:\MongoDB\data
Pause

It is important to note that the startup script can not space, if there are spaces in a directory, you need to include the "", pause is to prevent the console from automatically shutting down. And the paths here are absolute paths.

Also start MONGO Shell can write a bat file, as follows:

C \ "program Files" \ "MongoDB 2.6 standard" \bin\mongo
Pause

Installing MongoDB in 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.