Install Mongodb In Mac Catalina

Mongodb

How to install MongoDB on Mac OS Catalina (locally) If you are like me, running mongo servers on cloud IDE’s is just not the same as the customizations I have in my visual studio code. The need to test MongoDB servers locally sounds like an ideal option but I was running into issues trying to get the darn thing installed.

  1. When you install it on-premise, you have a choice of installing the Enterprise Server or the free Community Server. In this tutorial, we install the free Community Server. There are a couple of ways to install MongoDB on a Mac. Option 1: Install it via Homebrew (recommended). Option 2: Install it manually with the installation files.
  2. Installing MongoDB on Mac Catalina using Homebrew This entry was posted in MongoDB and tagged Security troubleshooting on January 10, 2020 by Dan Wahlin I recently bought a new iMac and moved all of my files over using Time Machine.
  3. Hi there, I am using MacOS Catalina and installed XAMPP on it. When I am trying to install PHP MongoDB driver using following command, it gives me errors mentioned below. Sudo pecl install mongodb I am getting following error: starts wit.
Install Mongodb In Mac Catalina

I recently bought a new iMac and moved all of my files over using Time Machine. The migration went really well overall and within a few hours I had my development machine up and running. After starting an application I’m building I quickly realized that I couldn’t get MongoDB to start. Running the following command resulted in an error about the data/db directory being read-only:

I tried every chmod and chown command known to man and woman kind, tried manually changing security in Finder, compared security to my other iMac (they were the same), and tried a bunch of other things as well. But, try as I might I still saw the read-only folder error when trying to start the server….very frustrating. I found a lot of posts with the same issue but they all solved it by changing security on the folder. That wasn’t the problem on my machine.

Mac

After doing more research I found out that Catalina added a new volume to the hard drive and creates a special folder where the MongoDB files need to go. The new folder is:

The MongoDB files can then go at:

Install Mongodb In Mac Catalina

Install Mongodb In Mac Catalina Free

I ran the following commands to install the latest version of MongoDB using Homebrew (see https://github.com/mongodb/homebrew-brew for more details):

I then went into the MongoDB config file at /usr/local/etc/mongod.conf. Note that it’s possible yours may be located in a different location based on how you installed MongoDB. I changed the dbPath value to the following and copied my existing DB files into the folder:

How to install mongodb on a mac

Finally, I made sure my account had the proper access to the folder by running chown (something I had tried many times earlier but on a folder outside of /System/Volumes/Data):

Install Mongodb In Mac Catalina Operating System

After that I was able to start MongoDB and everything was back to normal. Hopefully this saves someone a few hours – I wasted way too much time on the issue. 🙂


Install Mongodb Osx Catalina