A Quick Guide to Installing MongoDB on Windows
Join the DZone community and get the full member experience.Join For Free
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).
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.
you can connect to mongodb server as below by executing mongod exe
once the server is started, you can start administrative shell as below by executing mongo command.
from administrative shell if you want to add two numbers, you can do that as below,
by default, it connects to database test
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.
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
Opinions expressed by DZone contributors are their own.