MongoDB database tutorial, mongodb tutorial

Source: Internet
Author: User
Tags install mongodb mongodb tutorial

MongoDB database tutorial, mongodb tutorial

1. Install MongoDB
Https://www.mongodb.com/download-center? Jmp = nav
Select a Stable version of the corresponding system for download (Current Stable Release)
2. After installation, you need to create a configuration because you do not know where the database created by the executable file exists.
1. create a folder named MongoDB in the specified place (this address is "D: \ work \ MongoDB"), which contains data (storing database files) and logs (logs), etc (parameter configuration information)
Note: The path must not contain Chinese characters.

2. Create a file named mongo. conf in etc and modify it as follows:

# Database path dbpath = D: \ work \ MongoDB \ data # log output file path logpath = D: \ work \ MongoDB \ logs \ mongo. log # The append mode is used for error logs. After this option is configured, mongodb logs are appended to existing log files instead of creating a new file logappend = true # enable log files, journal = true by default # This option can filter out useless log information. If debugging is required, set it to falsequiet = false # port 27017 = 27017 by default

3. Configure MongoDB Environment Variables

A. right-click the computer on the desktop and select Properties B. in the pop-up panel, select Advanced System settings c. select the advanced option in the pop-up box. The following is the environment variable button d. find the system environment variable, open path, and enter C: \ Program Files \ MongoDB \ Server \ 3.2 \ bin

4. After environment variables are configured, you can enter "mongo" in any directory"
Waiting for connections on port 27017 is displayed, indicating that the instance is successfully started,
Then, you can use the mongo command to perform a series of database operations.

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.