Mongo command not found

Half way down the screenshot you will see the following line:

This states that the MongoDB engine cannot find the path /data/db. This is the default location to use for the data files if an alternate path is not provided on the command line or a config file. Since the path doesn’t exist, the process cannot create the database files that are needed and the process then shuts down.

If you installed MongoDB with brew, you should have a config file at /usr/local/etc/mongodb.conf that overrides the default location and writes the database files to /usr/local/var/mongodb. If this is the case, try running mongod -f /usr/local/etc/mongodb.conf

1 Like