Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop mongodb server on startup in Mac?

Tags:

mongodb

I recently installed MongoDB Community Edition on macOS. The manual says to use brew services start [email protected] to start the server.

When I want to shutdown the server, I enter mongo shell and type use admin and then type db.shutdownServer(). But when I reboot the computer, the server is auto started. How do I prevent it from auto starting at reboot in MacOS?

like image 373
LED Fantom Avatar asked Dec 08 '25 10:12

LED Fantom


1 Answers

Your computer can have multiple LaunchAgents folders.

My homebrew.mxcl.mongodb-community.plist file was under:

/Users/YOUR-USERNAME/Library/LaunchAgents/

Deleting it should solve this issue. After that a manual start is needed.

like image 60
Leopold Kristjansson Avatar answered Dec 10 '25 11:12

Leopold Kristjansson