Created
January 17, 2019 11:31
-
-
Save nijogeorgep/d5b4533676eded129053e29486a741fc to your computer and use it in GitHub Desktop.
MongoDB in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
================================================================================================================== | |
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