banner



How To Install Mongodb On Windows 10

MongoDB is an open-source certificate-oriented database that is designed to store a large scale of data and besides allows you to work with that data very efficiently. Information technology is categorized under the NoSQL(Non just SQL) database because the storage and retrieval of data in MongoDB are non in the class of tables. This is the general introduction of MongoDB now we learn how to install MongoDB on your Windows?.

Yous can install MongoDB using two unlike methods ane is using msi and another is using zip. Here, we volition talk over how to install MongoDB using msi, so you demand to follow each step carefully:

Step ane: Go to MongoDB Download Center to download MongoDB Community Server.

Hither, You can select any version, Windows, and packet according to your requirement. For Windows, nosotros need to cull:

  • Version: 4.two.2
  • Bone: WindowsOS
  • Package: msi

Pace 2: When the download is complete open the msi file and click the next push in the startup screen:

Stride 3: Now take the Terminate-User License Agreement and click the next button:

Step 4: Now select the complete option to install all the program features. Here, if y'all tin want to install simply selected plan features and desire to select the location of the installation, and so use the Custom pick:

Step 5: Select "Run service as Network Service user" and copy the path of the data directory. Click Side by side:

Step 6: Click the Install push button to start the installation process:

Step seven: After clicking on the install button installation of MongoDB begins:

Pace 8: Now click the Stop button to consummate the installation process:

Footstep 9: At present we go to the location where MongoDB installed in step 5 in your system and copy the bin path:

Step 10: Now, to create an environment variable open organisation backdrop << Environs Variable << Arrangement variable << path << Edit Environs variable and paste the copied link to your environment system and click Ok:

Footstep 11: Later setting the environment variable, we volition run the MongoDB server, i.eastward. mongod.  So, open the command prompt and run the following command:

          mongod

When y'all run this command you volition get an error i.due east. C:/data/db/ non plant.

Step 12: Now, Open up C bulldoze and create a folder named "data" within this folder create another binder named "db". Afterwards creating these folders. Once again open the command prompt and run the post-obit command:

          mongod

Now, this time the MongoDB server(i.e., mongod) volition run successfully.

Run mongo Shell

Pace xiii: At present we are going to connect our server (mongod) with the mongo shell. And so, keep that mongod window and open a new control prompt window and write mongo. At present, our mongo shell volition successfully connect to the mongod.

Of import Signal: Please do non shut the mongod window if you close this window your server will end working and it will not able to connect with the mongo shell.

 Now, you are fix to write queries in the mongo Shell.

Example:

Now you can brand a new database, collections, and documents in your beat. Below is an case of how to make a new database:

The use Database_name commend makes a new database in the system if information technology does not be, if the database exists it uses that database:

use gfg

Now your database is ready of name gfg.

The db.Collection_name commend makes a new collection in the gfg database and the insertOne() method inserts the document in the student collection:

db.student.insertOne({Akshay:500})

Source: https://www.geeksforgeeks.org/how-to-install-mongodb-on-windows/

Posted by: haynesshols1954.blogspot.com

0 Response to "How To Install Mongodb On Windows 10"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel