Mongodb--windows environment installation and simple use

Source: Internet
Author: User
Tags mongodb download

The company uses MongoDB to do the database function, the first use, so I went to study the next MongoDB website and related information, the local Windows environment to build a simple MongoDB database, words not to say, into the topic


First, download MongoDB1, MONGODB official website: Click Open 2,: MongoDB download

MongoDB website provides a lot of download version, now the latest is 3.2 version, and there are Linux, also have Windows different operating systems, I am the win 64-bit, so downloaded mongodb-win32-x86_ 64-2008plus-ssl-3.2.10


Second, after installing MongoDB1, download, double-click Install



2. Click Next to select Custom installation (it is best to specify your own installation directory)



3, change the installation path, specify your own installation directory (here you can first build the directory)



4, after changing the directory, click Next, then install installation, installation completed, click Finish, the installation is complete



Third, configure MongoDB

After MongoDB installation, you also need to configure the log directory and data directory , so as to normal use, the following are the steps to configure


1, in the installation directory of MongoDB, create log directory and data directory



2. Setting up MongoDB operating environment

Open the Windows CMD environment, go to your MongoDB installation directory bin directory, and then configure the MongoDB log directory and Data directory


(1) Specify the log directory command for MongoDB (it is best to use absolute paths here):

Mongod--logpath D:\NoSql\MongoDB\data\log\mongodb.log



(2) Specify the Data Directory command for MongoDB:

Mongod  --dbpath D:\NoSql\MongoDB\data\db



Execute command, see Generate data file and port number, then MongoDB boot succeeds



(3) Here you can access the localhost:27017 on the browser, you can see MongoDB boot successful prompt





Iv. simple use of MongoDB database 1, a different CMD environment, enter the installation bin directory of MongoDB and execute the mongo.exe command to see the test database connected to MongoDB



2, then, you can view the data table, view the database, add the deletion of the operation, is it very simple?




As for the other operation of MongoDB, please crossing yourself to find out, here This is the introduction of installation and simple use




Mongodb--windows environment installation and simple use

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.