I was trying to run MongoDB:
E:\\mongo\\bin>mongod
mongod --help for help and startup options
Sun Nov 06 18:48:37
Sun Nov 06 18:48:37 warning:
If you're using Windows 7/ 7+.
Here is something you can try.
Check if the installation is proper in CONTROL PANEL of your computer.
Now goto the directory and where you've install the MongoDB. Ideally, it would be in
C:\Program Files\MongoDB\Server\3.6\bin
Then either in the command prompt or in the IDE's terminal. Navigate to the above path ( Ideally your save file) and type
mongod --dbpath
It should work alright!
Also check if you have installed the Mongo as a windows service and if its running. That's also important. There might port conflict because of that.
Specify the database path explicitly like so, and see if that resolves the issue.
mongod --dbpath data/db
For Windows 7
You may specify an alternate path for \data\db
with the dbpath setting for mongod.exe,
as in the following example:
c:\mongodb\bin\mongod.exe --dbpath c:\mongodb\data\db
or
you can set dbpath through Configuration File.
Check that path to database data files exists ;) :
Sun Nov 06 18:48:37 [initandlisten] exception in initAndListen: 10296 dbpath (/data/db) does not exist, terminating
You should create a startup.bat
if you're using Windows, much more convenient:
C:\mongodb\mongodb-win32-x86_64-eiditon\bin\mongod.exe --dbpath C:\mongodb\data
And just dbclick startup.bat and mongodb will run using C:\mongodb\data
as its data folder.