Can't launch mongo shell (In macOS 10.15 Catalina)

hello guys, facing issue in launching mongo shell. please help me with this.
I installed by following mongodb documentation “Mac OS installation” --MongoDB Enterprise edition
I am getting following error
Screenshot 2020-04-27 at 8.55.43 PM

You are trying to run mongod on your local host

You have to use Vagrant

I’ve highlighted the main points:

  1. mongod didn’t startup because the default directory “/data/db” doesn’t exist. You need to create it beforehand.
  2. mongo failed to connect because of #1

As mentioned in the official documentation

Starting with macOS 10.15 Catalina, Apple restricts access to the MongoDB default data directory of /data/db . On macOS 10.15 Catalina, you must use a different data directory, such as /usr/local/var/mongodb .

But yet you said that you followed the documentation. It would also be useful to include the version of your OS in future threads otherwise we wouldn’t know.

Yes my mistake I was not sure about that to mention… sorry

1 Like

Hi @kiran_kumar_50167,

So, your issue is resolved, right ?

~ Shubham

no I could not? can u help?

Which step are you on and what is the difficulty now?

Hi @kiran_kumar_50167

In addition to @007_jb,

Did you try to start your mongod instance by specifying different datapath or did you create the /data/db directory manually ?

~ Shubham

@Shubham_Ranjan I’m using masOS Catalina. I have same issue. Even though i changes my terminal shell to bash. I was unable to run - mongo --nodb. As soon as try to run, the modal pops ups and says -

“mongo” cannot be opened because the developer cannot be verified.

I have followed all the steps of installation but unable to move forward due to above error. Please bring updates for macOS Catalina.

Hi @Nirmal_Patel,

Please refer this post created by @007_jb.

Let us know if the issue still persists.

~ Shubham