First, download and install MongoDB
1, official website download: https://www.mongodb.com/download-center#community
2. Installation
3, configure the path, as shown in the following image: Execute mongod.exe command, error "C:\data\db\ not found." Create a new "C:\\data\db" folder in the C drive.
The boot success screenshot is as follows:
4, run the Mongod.exe first, then run the Mongo.exe command.
Second, MongoDB command operation:
1. Query collection: "Show collections;"
2. Create a new Person collection: "Db.createcollection (" person ");"
3. Insert a record in the person collection: "Db.person.insert ({" Name ":" Csdb "," Age ": 30});"
4. Query all records in the person collection: "Db.person.find ();"
three, MongoDB visualization tools:
Download robomongo-0.9.0-rc10-windows-x86_64
Reference: http://www.yiibai.com/mongodb/mongodb_create_collection.html