Mongo_DB ( NOSQL )
MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License (SSPL).
Install MongoDB On Windows To install MongoDB on Windows, first download the latest release of MongoDB from Click Here.
Enter the required details, select the Server tab, in it you can choose the version of MongoDB, operating system and, packaging as:
Now install the downloaded file, by default, it will be installed in the folder C:\Program Files.
MongoDB requires a data folder to store its files. The default location for the MongoDB data directory is c:\data\db. So you need to create this folder using the Command Prompt. Execute the following command sequence.
Open CMD Run The Command
C:>md data
C:\md data\db
In the command prompt, navigate to the bin directory current in the MongoDB installation folder. Suppose my installation folder is C:\Program Files\MongoDB
C:\Users\Mandar>d:cd C:\Program Files\MongoDB\Server\4.2\bin
C:\Program Files\MongoDB\Server\4.2\bin>mongod.exe --dbpath "C:\data"
This will show waiting for connections message on the console output, which indicates that the mongod.exe process is running successfully.
Now to run the MongoDB, you need to open another command prompt and issue the following command.
C:\Program Files\MongoDB\Server\4.2\bin>mongo.exe
MongoDB shell version v4.2.1 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("4260beda-f662-4cbe-9bc7-5c1f2242663c") } MongoDB server version: 4.2.1
>
Mongo DB Installation Complete. Now Next time when you run MongoDB, you need to issue only commands.
C:\Program Files\MongoDB\Server\4.2\bin>mongod.exe --dbpath "C:\data"
C:\Program Files\MongoDB\Server\4.2\bin>mongo.exe