I have already installed Mongodb on my mac but the process is currently not running. How do I start the Mongodb service so that I can start using the commands?
As now is 2021 year, so start mongodb on Mac:
brewbrew services start mongodb-community
brew install mongodb-communitysimilarly:
brew services start mongodb-community@4.2
brew services install mongodb-community@4.2the start means start and enable start at launch/boot
for only run currently, use run:
brew services run mongodb-communityafter start, check status use:
brew servicesfor old version mongodb, the command is mongod:
mongodbmongod --config /usr/local/etc/mongod.conf
/usr/local/etc/mongod.confmongod --dbpath /data
/data is common mongodb database path