I cannot install MongoDB because of dbpath

1k Views Asked by At

while installing MongoDB on my windows 7 64-bit, when I execute command

C:\mongodb\bin\mongod.exe --dbpath d:\test\mongodb\data

it gives me error that switch dbpath is not recognized and when I check in its help, I really cannot find this --dbpath switch.

any help where i'm doing mistake?

1

There are 1 best solutions below

0
On

It looks right, on my system (windows 10) the following command line works to set up up as a windows service.

C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe --storageEngine wiredTiger --dbpath "C:\mongodata\db" --logpath "C:\mongodata\log\mongo.log" --serviceName yourname --serviceDisplayName "your description" --install

from the help:

C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe -help
  --dbpath arg                  directory for datafiles - defaults to \data\db\
                                which is D:\data\db\ based on the current 
                                working drive