-
Notifications
You must be signed in to change notification settings - Fork 15
mongo db
Current MongoDB version 3.4.7.0
By default when Mongo was installed it expects to have a directory created at C:\data\db
where it will store collections. However, when you first fire up Mongo the chances are that it is not there. Please create it.
Create database and log directories Invoke the following command in the Command Interpreter to create these directories:
md "\data\db" "\data\log"
Start your MongoDB database. From Command Interpreter:
"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe" --dbpath="c:\data\db"
Also, you can't access mongo.exe if the mongod.exe is not running. Basically you need to first fire up mongo server by using command line:
"C:\Program Files\MongoDB\Server\3.4\bin\mongod"
then fire up another power shell and use this:
"C:\Program Files\MongoDB\Server\3.4\bin\mongo"
Then you should have access to mongo db shell.