If you started mongod.exe
via a command prompt in Windows:
> mongod
And then you closed that command window, the process will automatically be terminated. It is not running any more.
The error you're receiving when running mongo.exe
is because MongoDB is not running. You'll need to run mongod.exe
again if you need to access the database with the console via mongo.exe
You may want to consider setting MongoDB up as a service on Windows.