How to stop mongo DB in one command

前端 未结 18 1257
小蘑菇
小蘑菇 2020-12-04 05:21

I need to be able to start/stop MongoDB on the cli. It is quite simple to start:

./mongod

But to stop mongo DB, I need to run open m

18条回答
  •  天涯浪人
    2020-12-04 05:52

    Using homebrew (recommended way):

    To start:

    brew services start mongodb-community

    To stop:

    brew services stop mongodb-community

提交回复
热议问题