Reputation: 136
I was getting this error when I was trying to change my dbpath
mongod --dbpath "C:\Program Files\MongoDB\Server\4.2\db"
Upvotes: 0
Views: 3456
Reputation: 136
I fixed it in 2 ways:
First, using cmd as an administrator then it worked
Second, changing my drive to some other drive.
mongod --dbpath "D:\MongoDB Self\db"
If you have any other solutions please let me know.
Upvotes: 4