Friday, June 1, 2012

Installing MongoDB as a service on Windows 7

Note to self:

When installing MongoDB as a service on Windows 7, don't rely on the PATH variable to access the executable. When installing the service via mongod --install, the service path is inferred, so when you attempt to net start, it won't find the executable (an absolute path is required).

In other words,

mongod --install

should be

C:\path\to\mongod --install

There goes 45 minutes of my day. Thank god it's Friday.