What's a clean way to stop mongod on Mac OS X?

后端 未结 9 1395
逝去的感伤
逝去的感伤 2020-12-12 09:28

i\'m running mongo 1.8.2 and trying to see how to cleanly shut it down on Mac.

on our ubuntu servers i can shutdown mongo cleanly from the mongo shell with:

9条回答
  •  再見小時候
    2020-12-12 09:54

    The solutions provided by others used to work for me but is not working for me anymore, which is as below.

    brew services stop mongodb
    brew services start mongodb
    

    brew services list gives

    Name              Status  User      Plist
    mongodb-community started XXXXXXXXX /Users/XXXXXXXXX/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
    
    

    So I used mongodb-community instead of mongodb which worked for me

    brew services stop mongodb-community
    brew services start mongodb-community
    

提交回复
热议问题