【发布时间】:2019-05-14 07:40:41
【问题描述】:
我是 mongodb 的新手。我正在使用the installation guide 安装MongoDB 4.0 community edition。安装后,我使用brew services start mongodb-community@4.0 运行MongoDB。为了彻底关闭服务器,我启动了一个 mongo shell,并运行了 use admin 和 db.shutdown.Server()。
接下来,要再次启动服务器,我运行brew services start mongodb-community@4.0 并得到了
`Service `mongodb-community` already started, use `brew services restart mongodb-community` to restart.`
所以我做了brew services restart mongodb-community@4.0 并得到了以下返回的消息:
Stopping `mongodb-community`... (might take a while)
==> Successfully stopped `mongodb-community` (label: homebrew.mxcl.mongodb-community)
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)
我的问题:
(1) 运行brew services start mongodb-community@4.0 和运行mongod 一样吗?
(2)为什么我再次启动服务器时显示Servicemongodb-communityalready started?我没有完全关闭服务器吗?
【问题讨论】: