Contents of page >
- Step 2 (MongoDB install) : create data folder
- Step 3 (MongoDB install) : Create Mongo Services >
- Step 4 (MongoDB install) : Start Mongo Services > net start mongodb
- Step 5 (MongoDB install) : Start Mongo Session > mongod
- Step 6 (MongoDB install) : NOW, OPEN NEW CMD window> mongo
Step 1 (MongoDB install) :
It gets installed in C:\Program Files\MongoDB\
Step 2 (MongoDB install) :
(create data folder i.e. in C:\Program Files\MongoDB\data)
Step 3 (MongoDB install) :
Create Mongo Services >
C:\Program Files\MongoDB\Server\3.0\bin>mongod -dbpath="C:\Program Files\MongoDB\data\db" --logpath="C:\Program Files\MongoDB\data\mongod.txt" --install
(Now, service gets created, logging file also gets created)
Step 4 (MongoDB install) :
Start Mongo Services >
C:\Program Files\MongoDB\Server\3.0\bin>net start mongodb
The MongoDB service was started successfully.
Step 5 (MongoDB install) :
Start Mongo Session >
Cd C:\Program Files\MongoDB\Server\3.0\bin>mongod (for setting up session details)
Step 6 (MongoDB install) :
NOW, OPEN NEW CMD window>
C:\Program Files\MongoDB\Server\3.0\bin>mongo
MongoDB shell version: 3.0.6
connecting to: test (Now, you are CONNECTED)
> db.database
test.database
Note : Nothing to worry with - Hotfix KB2731284 or later update is installed, no need to zero-out data files
Summary -
So in this mongoDB tutorial we learned how to Install and connect to MongoDB on windows.
Having any doubt? or you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.
RELATED LINKS>
Labels:
MongoDB