Tuesday, January 16, 2018

Setting Up Environmental Variable for MongoDB - Windows

Environmental Variable Setup for MongoDB

Go till bin path  where the mongodb is installed– and copy it,


C:\Users\tommy\Downloads\mongo_server\bin


Steps to be followed,

1)     Ctrl + R
2)     Type sysdm.cpl, click ok


3)     The following page will appear, In that select Advanced and click on Environment Variables


              4)     Here select Path and click on Edit

                            

       
         5)     Click on New -> Paste the bin path and click on OK, OK and OK for the three                                      consecutive windows which is already opened.


          Done..


    Now to start the server
               
                1)     Go to command prompt, just type mongod and mention the dbpath if any or else it will 
                go to the default directory data/db – hit enter ( don’t need to specify the path till bin )

     mongod –dbpath  C:\Users\tommy\Downloads\mongo_data


           2)     The server starts running listening to the default port  27017


          To start the client,

                1)     Open another command prompt, just type mongo

                 


            Note: By setting up the Environmental Variable, we don’t have specify the entire mongo                                binary path – Just type in the binary name.


Done..







               



   








1 comment:

  1. These 250-438 dumps focus on the most significant portions of the Data Loss Prevention certification that can be the part of the real 250-438 exam.

    ReplyDelete