Cannot Start mongodb-community

macbook@SamsMacbook ~ % sudo rm /tmp/mongod-27017.sock.
Password:
rm: /tmp/mongod-27017.sock.: No such file or directory

I get this when I write something like @Ramachandra_Tummala said.

macbook@SamsMacbook ~ % ls -lrt  /usr/local/var/mongodb    
total 0

I don’t know what installing as a regular user means. I deleted the mongo and reinstalled it many times. Nothing works.

macbook@SamsMacbook Library % ls -l /tmp/mongodb-27017.sock
srwx------  1 root  wheel  0  7 Eki 18:44 /tmp/mongodb-27017.sock

This is the situation right now. I thought I have removed the file but whenever I write this command, the result show up.

macbook@SamsMacbook ~ % ls -l /tmp/mongodb-27017.sock
srwx------  1 root  wheel  0  7 Oct 18:44 /tmp/mongodb-27017.sock

UPDATE

I found the .sock file and deleted it with sudo rm

However this time I get the error below;

macbook@SamsMacbook ~ % brew services list
Name              Status       User File
mongodb-community error  25600 root ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist

And now this is the log;

macbook@SamsMacbook /tmp % brew services list                     
Name              Status       User File
mongodb-community error  25600 root ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
macbook@SamsMacbook /tmp %  tail $(brew --prefix)/var/log/mongodb/mongo.log
{"t":{"$date":"2022-10-08T16:45:24.399+03:00"},"s":"I",  "c":"ASIO",     "id":22582,   "ctx":"MigrationUtil-TaskExecutor","msg":"Killing all outstanding egress activity."}
{"t":{"$date":"2022-10-08T16:45:24.399+03:00"},"s":"I",  "c":"COMMAND",  "id":4784923, "ctx":"initandlisten","msg":"Shutting down the ServiceEntryPoint"}
{"t":{"$date":"2022-10-08T16:45:24.399+03:00"},"s":"I",  "c":"CONTROL",  "id":4784925, "ctx":"initandlisten","msg":"Shutting down free monitoring"}
{"t":{"$date":"2022-10-08T16:45:24.399+03:00"},"s":"I",  "c":"CONTROL",  "id":4784927, "ctx":"initandlisten","msg":"Shutting down the HealthLog"}
{"t":{"$date":"2022-10-08T16:45:24.399+03:00"},"s":"I",  "c":"CONTROL",  "id":4784928, "ctx":"initandlisten","msg":"Shutting down the TTL monitor"}
{"t":{"$date":"2022-10-08T16:45:24.400+03:00"},"s":"I",  "c":"CONTROL",  "id":6278511, "ctx":"initandlisten","msg":"Shutting down the Change Stream Expired Pre-images Remover"}
{"t":{"$date":"2022-10-08T16:45:24.400+03:00"},"s":"I",  "c":"CONTROL",  "id":4784929, "ctx":"initandlisten","msg":"Acquiring the global lock for shutdown"}
{"t":{"$date":"2022-10-08T16:45:24.400+03:00"},"s":"I",  "c":"-",        "id":4784931, "ctx":"initandlisten","msg":"Dropping the scope cache for shutdown"}
{"t":{"$date":"2022-10-08T16:45:24.400+03:00"},"s":"I",  "c":"CONTROL",  "id":20565,   "ctx":"initandlisten","msg":"Now exiting"}
{"t":{"$date":"2022-10-08T16:45:24.400+03:00"},"s":"I",  "c":"CONTROL",  "id":23138,   "ctx":"initandlisten","msg":"Shutting down","attr":{"exitCode":100}}

I just dont even know what is going on at this point. All I ever wanted to do is setting up an environment an start my backend tutorial. I dont know if this is normal or not but I’m not sure if I ever use Mongo again.

Do you guys know why doesn’t anything work? Or any suggestion?