I am using mac osx 10.10.5
This question has been asked many times before and after completing the steps, I notice strange behavior.
These are the steps I took.
brew tap gapple/services brew install mongodb
This installs the product, and now when I do the brew services list , I can see mongodb in a stop state.
When I tried to start the brew services start mongodb , I get an error
Error: could not read plist for mongodb !
OK I googled solution
mkdir -p ~/Library/LaunchAgents cp /usr/local/Cellar/mongodb/3.0.6/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/
Now, as soon as the file is copied, when I do the brew services list ... the mongo process will start automatically.
Now when I do brew services stop mongodb It says:
Error: Service `mongodb` not running, wanna start it? Try `brew services start mongodb`
Now this is strange, because in the last step he said that it works. Now when i do
mongodb services list says the service is stopped. (so the stop command worked above, although it threw an error).
Now if i do
brew services start mongodb
It gives an error Error: Could not read plist for mongodb !
Now if I copy the file again
cp /usr/local/Cellar/mongodb/3.0.6/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/
The service will automatically start working.
I think all this is really strange. All I want is a clean way to start stopping the mongo db service. And although there are a lot of threads on this site (and in other places) ... they do not work or simply act strangely.