I installed MongoDB via Homebrew (following http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/) but it\'s not working.
Typing mongod
at shell
If you are on mongodb-community@4.0
. You can try to reinstall with brew reinstall mongodb-community@4.0
.
Then I get the following hint:
==> Caveats
mongodb-community@4.0 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have mongodb-community@4.0 first in your PATH run:
echo 'export PATH="/usr/local/opt/mongodb-community@4.0/bin:$PATH"' >> ~/.bash_profile
So you can just copy the echo
command and restart your shell!