Install Mongodb Catalina

Question or issue on macOS:

Today, you'll learn to install the MongoDB community edition on macOS Catalina and higher. Creating Data Folder. Before you install and use MongoDB, you need to create a data/db folder on your computer for storing MongoDB data. Before macOS Catalina, you can create this folder in the user's root directory with the following command. Apple can’t check app for malicious software. Using an app that can’t be checked for malicious software might harm your Mac or compromise your privacy. If you’re certain that the app you want to use is from a trustworthy source, you can override your Mac security settings to open it. See the Apple Support article Safely open apps on your Mac.

I’m relatively new to MongoDB and am trying to install MongoDB on my Mac with Homebrew, but I’m getting the following error:

I ran
brew update
Then
brew install mongodb

How to solve this problem?

Install MongoDB. Brew install mongodb-community or brew install mongodb. Before you can use MongoDB, you need to create a /data/db folder because MongoDB expects this directory (/data/db) on your machine to save the data. But Apple has already depreciated this directory on Catalina/BigSur machines and created a new volume on macOS Catalina. Install MongoDb Community version by executing the following commands on your terminal. Brew tap mongodb/brew brew install mongodb-community@4.2 This ensures mongodb is installed successfully on.

Solution no. 1:

Formula mongodb has been removed from homebrew-core. Check pr-43770 from homebrew-core


To our users: if you came here because mongodb stopped working for you, we have removed it from the Homebrew core formulas since it was migrated to a non open-source license.

Install Mongodb Catalina

Fortunately, the team of mongodb is maintaining a custom Homebrew tap. You can uninstall the old mongodb and reinstall the new one from the new tap.

Check mongodb/homebrew-brew for more info.

Solution no. 2:

first install mongoldb

Secondly install using this command. mangodb successfully installed

You will get the output

Solution no. 3:

Try this code in your terminal:

And then:

Install mongodb catalina operating system

Finally:

Install Mongodb Catalina Operating System

Mongodb

Solution no. 4:

In MacOs Catalina doesn’t work properly for me.

After the installation (https://zellwk.com/blog/install-mongodb/) i had to add permission to “/tmp/mongodb-27017.sock”

Macos

Install Mongodb Osx Catalina

and the command “mongod” seems to ignore the config file (mongod.conf) in “/usr/local/etc” so i have to always launch it with the dbpath argument

even if the same path is specified in the config file.

Also using “mongod” with configuration file doesn’t work for me

or

Install mongodb osx catalina

I solved all these issues starting the mongodb via brew services. That worked well without issues and takes the parameters from the right configuration file.

Install Mongodb Macos Catalina

Hope this helps!