History of MongoDB Installation & Usage on Windows
🔹 Pre-2015: Manual Zip
Installation
- MongoDB
distributions for Windows were provided as .zip archives.
- Users
had to manually:
- Unzip
the folder (e.g., mongodb-win32-x86_64-3.x.x.zip)
- Move
it to a location like C:\mongodb
- Create
data directories manually like C:\data\db
- Start
MongoDB using mongod.exe via Command Prompt
Services were not
installed automatically — users had to run MongoDB manually each time.
🔹 2016–2017: Community
Awareness and Blog Tutorials
- Tutorials
(like yours from February 15, 2016) became popular.
- Blogs
explained:
- How
to run multiple MongoDB instances on different ports
- How
to connect via the mongo client
- How
to insert JSON documents manually
This period was crucial for learning MongoDB at a grassroots
level, especially for developers using Windows as a dev environment.
🔹 2018–2019: MSI
Installer + Windows Services
- MongoDB
provided an MSI installer:
- Made
setup easier
- Added
MongoDB as a Windows Service (optional during install)
- Users
no longer had to manually run mongod.exe
- Data
directories and logs were auto-configured
- MongoDB
Compass was introduced for GUI access
🔹 2020–Present: Modern
Tools + MongoDB Atlas
- Installation
now supports:
- Chocolatey:
choco install mongodb
- Windows
Subsystem for Linux (WSL): Developers can run MongoDB natively on
Linux inside Windows.
- Many
users moved to MongoDB Atlas (cloud version), reducing the need for
local installs.
- Windows
developers still use local MongoDB for development/testing via MSI or
Docker.
How to Mongo DB installation and work out in Windows :
- Download
MongoDB:
Download mongodb-win32-x86_64-3.0.7.zip from the official MongoDB website, unzip it, and place the folder named mongodb (which contains the bin directory) in the C:\ drive. - Create
Database Directory:
In C:\, create the directory C:\data\db for a single instance of MongoDB.
For multiple database instances, create folders like C:\data\db1, C:\data\db2, and so on. - Start
MongoDB Server:
Open Command Prompt as Administrator and run:
cd C:\mongodb\bin
mongod.exe --dbpath C:\data\db
This starts MongoDB on the default port 27017. - Start
Multiple MongoDB Instances:
To run multiple databases on different ports, use:
mongod.exe --dbpath C:\data\db1 --port 27018
mongod.exe --dbpath C:\data\db2 --port 27019 - Open
MongoDB Client:
Again in Command Prompt (Admin), navigate to:
cd C:\mongodb\bin
Run mongo to open the default client connected to port 27017. - Connect
to Other DB Instances:
Use:
mongo --port 27018
mongo --port 27019
Inserting JSON Data into MongoDB:
- After
opening the client, you can begin inserting data in JSON format.
- Create
a collection (like a table) named Customer.
Insert sample JSON data:
Like: { |
Querying Data in MongoDB:
- To
fetch a specific document:
db.Customer.find({"firstName":
"John"}).pretty()
- To
fetch all documents:
db.Customer.find().pretty()
If you found this guide useful, feel free to comment
below or share it with your fellow developers!
replica of mongodb |
install mongodb |
For More DSA Related information, visit
Ø
Bench
mark of compiler using Ackerman function
Ø
To
check if the rows of a matrix are circularly identical in Java
Ø
Frequency
Weaving Logic & Spiral Printing of a Rectangle
Ø
Zig Zag
Matrix print multiple way
Ø
Greedy
Algorithm’s or knapsack algorithms
Ø
understanding
recursive method for binary tree
Ø
Dynamic
Programming: Max Square Sub-matrix of 1s in a Matrix
Ø
Previous and
Next Date Palindrome
Ø
Karatsuba's
Algorithm for multiplying two large numbers
Ø
Multiplication
In different Way
Ø
How
to draw a Tree from array of integer
Ø
Position
of robot after given movements
Ø
Alphanumeric
Random Number generator
Ø
Solving
Tiger-Goat-Boatman Puzzle: BFS & DFS River Crossing
Ø Dijkstra
Shortest Path for directed an undirected graph
Ø Dollar
amount into the minimum number of currency denominations in java
Ø
Learn about Dijkstra’s Algorithm in Java [Click
here]
For More Java Related information, visit
Ø
Streams
Lambdas Collectors and Functional Interfaces in Java 8
Ø
Java
8 support static method or default method or both in the interface
Ø
Serialization
understanding
Ø
Garbage
Collection Under Standing
Ø
How
work Garbage Collection in Java
Ø
Under
Standing Of Mutable and Immutable Class
0 Comments