


Next time when you run MongoDB, you need to issue only commands. This will show that MongoDB is installed and run successfully. Now to run the MongoDB, you need to open another command prompt and issue the following command.Ĭ:\Program Files\MongoDB\Server\4.2\bin>mongo.exeĬonnecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb This will show waiting for connections message on the console output, which indicates that the mongod.exe process is running successfully. Suppose my installation folder is C:\Program Files\MongoDBĬ:\Users\XYZ>d:cd C:\Program Files\MongoDB\Server\4.2\binĬ:\Program Files\MongoDB\Server\4.2\bin>mongod.exe -dbpath "C:\data" In the command prompt, navigate to the bin directory current in the MongoDB installation folder. For the same, issue the following commands. Then you need to specify set the dbpath to the created directory in mongod.exe. So you need to create this folder using the Command Prompt. The default location for the MongoDB data directory is c:\data\db. MongoDB requires a data folder to store its files.
#Command to start mongodb server install
Now install the downloaded file, by default, it will be installed in the folder C:\Program Files\. Įnter the required details, select the Server tab, in it you can choose the version of MongoDB, operating system and, packaging as: To install MongoDB on Windows, first download the latest release of MongoDB from.
#Command to start mongodb server how to
Let us now see how to install MongoDB on Windows.
