Collection of resources about MongoDB, including how to install, run, and perform operations.
$ brew tap mongodb/brew $ brew install mongodb-community@4.4 Start:
$ brew services start mongodb-community@4.4 Stop:
$ brew services stop mongodb-community@4.4 Start:
$ mongod --config /usr/local/etc/mongod.conf --fork Stop:
To stop a mongod running as a background process, connect to the mongod from the mongo shell, and issue the shutdown command as needed.
Start:
$ mongo Exit:
> quit() > db.disableFreeMonitoring() > help > show dbs > use <db_name> > db > show collections > use <db_name> > db.dropDatabase() > db.<collection>.drop()