MongoDB environment configuration and use under Windows (full plot)

Source: Internet
Author: User

Always feel that the configuration of the environment is a super troublesome thing Ah, and the online said is more chaotic, after the configuration has not said how to start running, in which input additions and deletions to change the statement, like a sudden fault. So here's a detailed talk.

One: Download and install

1, to the official website of the download page

2, after downloading is an EXE installation program, as long as you have to press next. Used to be a compressed package, now a lot of convenience, but the default installation path is C:\Program Files\mongodb (I am solid state Drive, hehe)

Two: Create the Data folder and set the data path in cmd

1, I directly in the MongoDB bin file inside the Data folder set, the database is placed inside.

2. Then open cmd, enter into the Bin folder under the MongoDB installation directory, execute Mongod--dbpath (absolute path of data)

Because my data file is in the current directory (Bin folder), so there is no need to hit the path (hehe).

3. Observe the cmd output:

There was a remark that had been ok!

4, in the browser input http://localhost:27017/

That means it's done! If you don't succeed, you won't find the page.

Three, Configuration complete

1, this time the data folder has generated a lot of things (we do not care)

2, at this time directly shut down the CMD can, now we have been configured.

Iv. Use of MongoDB

1. Open the Mongod.exe file in the bin directory

This is what happens when you open the MongoDB database, and the program stays open when you use the database. (whatever else is not in the tube)

2. Open Mongo.exe

Use mongdb here, and write the statement.

Example (a Find statement):

OK, I believe MongoDB installation configuration and use everyone has learned it ~

MongoDB environment configuration and use under Windows (full plot)

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.