mongodbwiredtigerstudio3t

Unable to connect Mongodb


I have installed mongodb ans Studio 3T on windows 10, 64 bit system but when I run

mongod --auth --dbpath C:\data\db --storageEngine wiredTiger 

this command, it says 'mongod' is not recognized as an internal or external command, operable program or batch file.

I am not sure why this error comes even mongo.exe and mongod.exe is available under "C:\Program Files\MongoDB\Server\3.0\bin" folder

Please help.


Solution

  • Yes, because you need to cd into the directory where the mongodb folders are created when you installed it.

    For windows:- C:\Program Files\MongoDB\Server\3.6\ as per click here

    Details Steps for you:-

    1. cd C:\Program Files\MongoDB\Server\3.0\bin
    2. check for mongo.exe, mongod.exe and etc.
    3. mongod.exe --auth --dbpath C:\data\db --storageEngine wiredTiger
    4. you should be able to connect now.

    Note:- Above steps assumes that Mongodb service is running. If not Click here

    OR you can add the path C:\Program Files\MongoDB\Server\3.0\bin to enviornment variable.