I am trying to create a new folder in the main directory
Tried all kinds of examples
sudo mkdir /data/db
sudo mkdir -p /data/db<
I create a gist with simple steps to install and run mongodb on catalina
# install homebrew (https://brew.sh/) and run the following commands
sudo chown -R $(whoami) $(brew --prefix)/*
brew tap mongodb/brew
brew install mongodb-community@4.2
## --- aliases to set in your zshrc file
# open your zshrc file
open ~/.zshrc
# copy and paste shorcuts in the end of the file
alias mongod='brew services run mongodb-community'
alias mongod-start='brew services start mongodb-community' #will start MongoDB automatically when you login into your Macbook
alias mongod-status='brew services list'
alias mongod-stop='brew services stop mongodb-community'
# restart your terminal
# type mongod in your terminal for run service & mongod-stop for finish it
# test your mongodb connection with
mongo
show dbs
https://gist.github.com/sturmenta/cf19baa91b1d79d8ae2b305fb7e1f799