Installing MongoDB with windows msi installer needs administrator rights. Alternatively you can install the community edition on your local account without admin privileges. Follow the below steps to setup the mongo db server on your local account
- Download the ‘MongoDB Community server‘ zip package for windows platform.
- Create two directories on your local machine
C:\MySoftwares\MongoDB\mongodb-setup
C:\MySoftwares\MongoDB\mongodb-data - Untar the zip under mongodb-setup
- Run below command from bin directory through command promt
- cd C:/BaseDir/MongoDB/mongodb-data
- mongod –dbpath=C:/BaseDir/MongoDB/mongodb-data
- check verion and oprn the mongodb commandline
- mongo –version
- mongo
- Set the path variable specific to local user
There are chances that it throws an error like – “The program can’t start because VCRUNTIME140.dll is missing from your computer.” Ensure that ‘Visual C++ Redistributable for Visual Studio 15’ is installed on your system. The manual solution would be to download the VCRUNTIME140.dll file and copy it inside bin directory.
Once the MongoDB 4.4 Server starts without any error will show following message on console.
The mongo-db command db will give following output.