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