gasradragon.blogg.se

Run mongodb as a service windows
Run mongodb as a service windows








If you run the –install command above (against the 3.2 mongod.exe) without first removing the 3.0 service, it will appear to work – it won’t error – but if you look at the service it won’t have been updated and will still be pointed to the 3.0 bin folder. However, as I mentioned, the installer doesn’t know anything about your service which means it’s still pointing to “C:\Program Files\MongoDB\Server\3.0\bin\mongod.exe” which no longer exists so that service will no longer start.

run mongodb as a service windows

3.0.x to 3.2.x), when I previously went from 3.0.11 to 3.2.3 the installer uninstalled the old version (although it did leave an empty 3.0 folder in “C:\Program Files\MongoDB\Server\”, as well as the newly installed 3.2 folder. The installer doesn’t know anything about any services you may have set up, but if you do have a service running it will identify that the exe is in use and prompt you to kill it so it can be overwritten.įor a major/minor version (e.g. 3.2.3 to 3.2.5) running the new installer will just overwrite what’s there.

Run mongodb as a service windows windows#

The default installation path on Windows is in the format “C:\Program Files\MongoDB\Server\3.2”, so for a point release (e.g.

run mongodb as a service windows run mongodb as a service windows

To create the service (from admin command prompt) mongod -dbpath=C:\PathToMyMongoDbData\ -logpath=C:\PathToMyMongoDbData\mongod.log -install Turns out my little script wasn’t actually necessary. For a long time I’ve had a little batch file to create a service once I’d run the installer, and with each passing version I just incremented the version number.Īnyway, one time I couldn’t put my finger on my old script and had to go from scratch.








Run mongodb as a service windows