NoSQL Zone is brought to you in partnership with:

Dhananjay Kumar is a Telerik MVP, Microsoft MVP and a prolific blogger. He blogs at debugmode.net He is very much active and connected with fellow developers on Twitter. You can follow him here on twitter. For updates of blog posts and technical discussions, you can connect with him on Facebook Dhananjay has posted 17 posts at DZone. You can read more from them at their website. View Full User Profile

A Quick Guide to Installing MongoDB on Windows

02.16.2012
| 6022 views |
  • submit to reddit

In this 5 minute post, we will do a quick tutorial for MongoDB on Windows. I will show you the way to connect to MongoDB Server and to start the administrative shell.

First you need to download 64 bit binaries for Windows 64 bit from here . After downloading, unzip downloaded ZIP file at any location of your choice. After extracting, rename folder to mongodB

Next, navigate to the folder in which you unzipped the downloaded binaries. You will get the executable file downloaded (below).

image

The most important exe is, Mongod.exe to connect to mongo database server and Mongo.exe to start administrative shell.

By default, MongoDB creates the database and stores data in the Data folder inside C Drive. You need to create this folder manually, as shown below.

image

You can connect to MongoDB server as below by executing mongod exe

image

Once the server is started, you can start administrative shell as below by executing mongo command.

image

From administrative shell if you want to add two numbers, you can do that as below,

image

By default, It connects to database test

image

If you want to insert data you can do that as below, below command will create a database called debugmode [only when first row is inserting] and then add name as dj.

image

You can explore Help option to know more about the executable and commands. In further article we will go deeper on same and explore working with MongoDB and CSharp.

I hope this post is useful. Thanks for reading

 Source: http://debugmode.net/2012/01/21/mongodb-on-windows-quick-start-in-5-minute/

Published at DZone with permission of its author, Dhananjay Kumar.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags: