Skip to content

Instantly share code, notes, and snippets.

@nijogeorgep
Created January 17, 2019 11:31
Show Gist options
  • Save nijogeorgep/d5b4533676eded129053e29486a741fc to your computer and use it in GitHub Desktop.
Save nijogeorgep/d5b4533676eded129053e29486a741fc to your computer and use it in GitHub Desktop.
MongoDB in Windows
==================================================================================================================
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#configure-a-windows-service-for-mongodb-community-edition
mkdir c:\data\db
mkdir c:\data\log
----------------------------------------
mongod.cfg (Create At : C:\Program Files\MongoDB\Server\3.6)
----------------------------------------
systemLog:
destination: file
path: c:\data\log\mongod.log
storage:
dbPath: c:\data\db
-----------------------------------------
mongod --config "C:\Program Files\MongoDB\Server\3.6\mongod.cfg" --install(Installs Windows service)
mongod --dbpath "C:\data\db" (Set DB path)
mongo (Mongo Shell)
net start MongoDB (Start MongoDB Server Service)
net stop MongoDB (Stop MongoDB Server Service)
sc.exe delete MongoDB (Delete MongoDB Server Service)
==================================================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment