MongoDB Learning (a) installation

Source: Internet
Author: User

First step: Download the MongoDB installation version for installation

Https://pan.baidu.com/s/1X3hIqORJ61TCG1UJ_yr6ag

The installation steps are the next step, and it's easy to say nothing.

Step Two: Set the path DBPath the Mongod.exe point to the data alternate path.

D:\soft\mongodb\bin>mongod--dbpath D:\mongodb\data\db

Will come out a bunch of output, indicating successful installation

Step three: Run the MongoDB

C:\USERS\ADMINISTRATOR.SKY-20170815DYT>D:D:\>CD D:\soft\mongodb\bind:\soft\mongodb\bin>mongo.exe

If you print out the following log.

MongoDB Shell version v3.4.10connecting To:mongodb://127.0.0.1:27017mongodb Server Version:3.4.10welcome to the MongoDB Shell. For interactive help, type ' help '. For more comprehensive documentation, see        http://docs.mongodb.org/Questions? Try the support group        Http://groups.google.com/group/mongodb-user

Fourth step: Under Test, simple storage

> Db.test.save ({a:1}) Writeresult ({"ninserted": 1}) > Db.test.find () {"_id": ObjectId ("5abf8653521989e02fb2fd33 ")," a ": 1}

MongoDB has a default test library, where it is stored first, and then can be queried to indicate the installation OK.

Fifth step: Connect to Robomongo, initialize not set password, can connect on any connection.

You can see the values stored through the console in the test library.

Sixth step: Next start or repeat steps two through fourth.

D:\soft\mongodb\bin>mongo.exe--dbpath d:\mongodb\data\dbc:\users\administrator.sky-20170815dyt>d:d:\> CD D:\soft\mongodb\bind:\soft\mongodb\bin>mongo.exe

So you can connect.

MongoDB Learning (a) installation

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.