Connect ECONNREFUSED after Mongod community 6.0 installation

The permission related issues occur if you had run mongod as root
So check permissions on dbpath & logpath folder
ls -lrt /tmp/mongod-27017.sock
If you have multiple versions you have to start brew service giving the version number but your command does not append version number
Also from logs i see it is using /data/db which is default dbpath location.On Macos access to root folders is removed.If this is causing issues you have to give different dirpath
Till your default mongod on port 27017 issue is resolved you can always spinup your own mongod on a different port,dbpath,logpath by giving some port like 28000 and your home directory
Ex:
Mongod --port 28000 --dbpath homedir --logpath homedir/mongod.log --fork

1 Like