mongod command not recognized when trying to connect to a mongodb server

后端 未结 14 627
暖寄归人
暖寄归人 2021-01-31 01:11

I am following the tutorials at docs.mongodb.org, I have completed the first tutorial which was to install mongodb on a windows machine. I am now at the second stage which is ge

相关标签:
14条回答
  • 2021-01-31 02:07

    Seems like, The environmental variable is not correctly set up.

    Go to the mongodb installation folder and get the executable files (mongo.exe, mongod.exe etc) location. (In my case) Something like :

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

    Then go to :

    Panel > System & Security > System > Advanced System Settings > Environment Variables 
    

    Find the PATH variable and edit its value. Then add C:\Program Files\MongoDB\Server\3.2\bin and don't forget to separate each values with ;. Now confirm and exit.

    0 讨论(0)
  • 2021-01-31 02:07

    before using MongoDB you have to run it locally to do that:

    • go to bin folder you will find at C:\Program Files\MongoDB\Server\4.2\bin
    • open mongod.exe. will open a new terminal with server details.
    • open mongo.exe. will open the shell which allows you to interact with the database.
    0 讨论(0)
提交回复
热议问题