MongoDB Essentials on Windows 10

You can install MongoDB on Windows 10 (x64) by simply downloading and running the setup executive from the official MongoDB website. To initiate MongoDB you have to run the 'mongod.exe' file from the installation folder, for example:

C:\Program Files\MongoDB\Server\4.0\bin\mongod.exe

And then run the 'mongo.exe' executive to start the MongoDB shell:

C:\Program Files\MongoDB\Server\4.0\bin\mongo.exe

Now you can execute MongoDB commands, for example, here is how you can list existing databases:

show dbs

And to switch to one of the databases:

use database-name

Command to list collections within a database:

show collections

And to view entries within a collection:


Here is how you can find a specific collection entry using one of the attributes, for example:

db.collection-name.find({"title" : "the-title"})

And to remove a specific entry:

db.collection-name.remove({"title" : "the-title"})

> Next Article

< Home Page

Technologies: MongoDB

VAIDOTASWEB.COM Blog provides simple to complex tutorials on topics like Web Development, Operating Systems, Graphic Design, Audio Equipment, etc.

Disclaimer: tutorials provided in this blog are intended for informational purposes. End results may vary depending on factors like different operating systems, software versions, etc.