In this article, I will share how to install MongoDB on MacOS Catalina.
First, I created a directory under the Library folder as shown below. /Users/onur/Library/Data/data/db
You can use any path as you want.
Then, I gave read and write privileges to these folders.
chmod -R 777 Data/
Under db folder, I run below commands.
brew tap mongodb/brew brew install mongodb-community brew services start mongodb-community
Then I test mongo command as shown below:
I also run below command to point dbpath to my folder.
sudo mongod --dbpath /Users/onur/Library/Data/data/db
Onur Baskirt is a senior IT professional with 15+ years of experience. Now, he is working as a Senior Technical Consultant at Emirates Airlines in Dubai.