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<
So, with macOS Catalina Apple created a new Volume for security purposes. If you’re on macOS Catalina, you'll need to create the /data/db
folder in System/Volumes/Data
.
Follow these commands
sudo mkdir -p /System/Volumes/Data/data/db
sudo chown -R
id -un /System/Volumes/Data/data/db
Start MongoDB
brew services run mongodb-community
Enjoy