Steps How To install MongoDB in your System

To download go to the official site on Mongo dB from here

Choose as per your OS requirement. Choose the community version as it is free to use 

After download, you need to set the path variable if not set. To allow MongoDB to run on your whole system and can be accessed from any folder you want.

choose Advance system settings and change the environment variable using set path. IN my case C:\Program Files\MongoDB\Server\4.2\bin

You can create a mongo database locally or on Server Like ATLAS which will provide also free version of Mongo databases to users / can use Dynamo DB etc which you found suitable.
On installing on windows it will ask for the default database path where you can change the destination of your database to store. You just simply install to learn with simple steps.

Install Mongo DB compass 

Compass is user to provide a graphical user interface and you can easily edit & do crud operations easily. Manage indexes and create indexes in documents in collections.
After install use command to mongod to start MongoDB

  • if not start to check the path variable or the database root folder are correct.
  • Manually create a folder in c drive as data/DB and its looks like as C:\data\db and then retry mongod

You can open another terminal/cmd prompt/git bash/ shell to work for the mongo DB database as in this command prompt our mongo server is running. If we close it that we need to restart again.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

codeforbetter will use the information you provide on this form to be in touch with you and to provide updates and marketing.