Skip to content

Instantly share code, notes, and snippets.

@aswad32
Last active October 11, 2016 05:48
Show Gist options
  • Save aswad32/fbf308d58c9effce9288a359fce65f92 to your computer and use it in GitHub Desktop.
Save aswad32/fbf308d58c9effce9288a359fce65f92 to your computer and use it in GitHub Desktop.
After done with installation process, open terminal as administrator and change to 'mongodb bin' directory in my case it would be C:\Program Files\MongoDB\Server\3.2\bin and run the following command
mongod.exe --dbpath=D:\mongodb --logpath=D:\mongolog\log.txt --install
--dbpath -specify the path name where mongodb should store the data
--logpath -specify the path for any log related to mongodb
At least those 2 parameters should be included inside the command line argument
To check either the service started or not, in the terminal, type the following command
> mongo.exe
MongoDB shell version: 3.2.9
connecting to: test
If you see above message, then everything is good, but if not go to windows service and start the services.
In order to make it easier for everyone to manage their mongodb instance, you can download robomongo gui tools here https://robomongo.org/download
that's all, now you easily create database and collection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment