Hi,
If you installed using the mongodb-community
recipe as per Install MongoDB Community Edition on macOS, the installation should have created:
- the configuration file (
/usr/local/etc/mongod.conf
) - the
log directory path
(/usr/local/var/log/mongodb
) - the
data directory path
(/usr/local/var/mongodb
)
The expected way to manage MongoDB would be using brew services
(for example: brew services start mongodb-community
), which will use the default configuration file and paths. You can change the dbPath
and other options by editing the configuration file before starting MongoDB.
If you start mongod
manually (as per your initial example), you will have to provide the --dbpath
and other desired options. The legacy hardcoded default dbPath
of /data/db
is not supported in Catalina.
Regards,
Stennie