Can I just kill mongod to stop mongo?

Michael picture Michael · Jan 29, 2014 · Viewed 63.3k times · Source

I am very new at Mongo. I am running mongod as described here in Mac OS X. I am running two mongod processes from the command line. If I need to stop the mongod processes I just execute kill <pid of mongod>. Is it the recommended way to stop mongod?

Answer

Mailis Toompuu picture Mailis Toompuu · Jan 31, 2016

It finally succeeded (Ubuntu 15.04) with

//1.find process by name:

$ pgrep mongo

1350

//2.kill mongod-process

$ kill 1350