Installation mac os exitCode 100

Hi, I try to install mongodb using brew on Mac OS Big Sur version 11.1 but when I run “mongod” in the terminal I get the error message shutting down exitCode 100.

I have tried the following command “sudo chown -R eliasstihl /usr/local/var/mongodb” but it doesn’t seem to work anyway.

What am I doing wrong?

If you run just mongod without any params it tries to bring up mongod on default port and default dirpath-/data/db
In new versions of Macos access to /data/db is restricted
Also did you create logpath dir and given necessary permissions?

So try this
mongod --dbpath your_dbpath --logpath your_logpath --fork

Please check mongo doc for different options