A blog about Swift and iOS tricks

Useful Aliases to Run MongoDB on macOS

Before MongoDB v4.2.3, dealing with it was pretty easy from the terminal. We could run the mongod command to start MongoDB. This no longer works from MongoDB v4.2.3 onwards. Here is some useful shorthands.

alias mongod='brew services run mongodb-community'
alias mongod-status='brew services list'
alias mongod-stop='brew services stop mongodb-community'