DEV Community

keshri1
keshri1

Posted on

How to setup MongoDB and robo3t

I am assuming that mongodb is installed in your system.

To start the mongodb server we need to open the command prompt and give the below command:
/Users/sunny/mongodb/mongodb/bin/mongod.exe --dbpath=/Users/sunny/mongodb-data

The first part is the folder location of your mongodb file and the second part is the folder location where you want to store all the data which you will create in future.

Next we need to download robo3t which is a GUI to manage our mongodb database.

step 1:download robo3t
step 2:open and click on create button
step 3:Give any name
step 4:let it run on local host with port unchanged as it is the same port in which we started our mongodb server.you can go back and chcek in the command prompt there you can se the message : "Listening on 127.0.0.1
2020-05-18T15:44:25.282+0530 I NETWORK [listener] waiting for connections on port 27017".
step 6: click on test to check whether your connection has been established and access to database is provided.
step 6:Your database has been created, now to check whether robo3t is connected to mongodb we need to open shell command from robo3t (right click on db and click on open shell)
step 7:give the command-db.version() and it should return the correct version of mongodb which ensures that your connection has been established.

step 6: click on save.

There you go with mongodb and robo3t setup.

In my next post I will be sharing how to integrate mongodb with node js application.

Thank you.

Top comments (0)