When you run just mongod without any params it looks for default dbpath /data/db
Since it is not there it failed
On Macos access to root dir /data is removed
so you have to give some other dir
Try this
mongod --port 28000 --dbpath your_home_dir --logpath your_home_dir/mongod.log --fork
Once mongod is up connect as mongo --port 28000 or mongosh --port 28000 depending on the shell you have
Regarding the error exited with error 1 from services you need to investigate why it is filing to start
1 Like