How to install and start MongoDB

ERROR in Cannot find module ‘node-sass’
July 12, 2019
What is Version Control
July 13, 2019

How to install and start MongoDB

Step 1- Go to the official website of MongoDB and download MongoDB software and follow below instructions.

For a 64-bit operating system

For a 32-bit operating system

Step 2- In C drive make a folder with name data and in data folder make another folder with name db.

Step 3- Assign Port to MongoDB

Open Command Prompt and enter in bin folder

C:> cd program files

C:Program Files> cd MongoDB

C:Program Files>MongoDB> cd server

C:Program Files>MongoDB>Server> cd 3.2

C:Program Files>MongoDB>Server>3.2> cd bin

C:Program Files>MongoDB>Server>3.2>bin>

Here 4.0 is version

Now run command

C:Program Files>MongoDB>Server>3.2>bin> mongod

This command assigns you port 27017

Remember don’t close this Command Prompt

Step 4-To enter in MongoDB shell version

Open new command prompt and go to bin folder then run command

C:Program Files>MongoDB>Server>3.2>bin> mongo

You are now in MongoDB shell

Thank you

Leave a Reply