MongoDB Environment Build-up

Source: Internet
Author: User
Tags json mongodb

MongoDB is a non-relational type of database, data storage is very flexible, using a storage structure of Bson, a binary form of class JSON storage format, supporting embedded document objects and array objects, and support some data types that JSON does not support, such as the date type. First, install MongoDB installation is very simple, the download of the compressed package can be extracted. second, the start of MongoDB into the MongoDB directory, that is, the current d:\Development\mongodb\, create folder data; Create subfolders in data db and log Alternatively, create a new log file under the log folder Log.log
1. Command line Startup

<span style= "FONT-SIZE:14PX;" >mongod  --logpath d:\Development\mongodb\data\log\mongodb.log--dbpath d:\development\mongodb\data\</ Span>
It is important to note that the command line must be positioned to d:\Development\mongodb\bin\ to write batch commands, Start.bat
<span style= "FONT-SIZE:14PX;" >CD d:\Development\mongodb\bin
mongod  --logpath d:\Development\mongodb\data\log\mongodb.log--dbpath D :\development\mongodb\data\</span>

2, as a Windows service startup (slightly) 3, MongoDB abnormal shutdown MongoDB in the abnormal shutdown, need to repair, use the Mongod--repair command
Mongod  --repair--dbpath d:\Development\mongodb\data\db
mongod  --logpath d:\Development\mongodb\data\ Log\mongodb.log--dbpath d:\Development\mongodb\data\db


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.