banner



How To Install Mongodb On Windows 8 64 Bit

Install MongoDB in Windows 10 - Zip Package

In this quick article, we volition learn how to install step by pace MongoDB zip version in windows 10.

Video Tutorial

This tutorial explained in below YouTube video:

Footstep 1: Downloading MongoDB

Download MongoDB server customs edition from MongoDB Download Center.

Refer below screenshot to choose the ZIP version of your package and choose your Operating version similar to the below image:

Version: current release
Os: Windows 64-fleck
Package: Naught.

Now click on the Download button and save it into an appropriate location on your computer's disk.

Step two: Installing MongoDB

At present extract the zippo file into a drive, for example, C:\. You lot can also extract in any location equally per your choice or requirements.

Pace 3: Creating Directory – data\db

Now create a directory called data\db in parallel to the root directory of the MongoDB extracted binder.

The data\db directory is required to relieve the database records.

Notation if y'all do not create such directory then you will become below error in the console output:

                exception in initAndListen: NonExistentPath: Data directory <disk drive of mongodb installation root directory>:\information\db\ not found., terminating              

Step 4: Running the MongoDB Server

Let's run the MongoDB server past executing the following command from the cmd window.

Navigate to the <MongoDB root directory>/bin folder in the cmd window and execute the mongod.exe file.

For example,

                C:\downloads\mongodb-win32-x86_64-2012plus-4.2.ane\bin>mongod.exe              

Now MongoDB server runs on the default port: 27017

Step five: Running MongoDB Customer

We want to examination whether our MongoDB server is running or not and perform some database operations. So run the mongo.exe file in the bin folder in a cmd window.

For instance,

                C:\downloads\mongodb-win32-x86_64-2012plus-4.two.1\bin>mongo.exe              

Once your MongoDB client successfully connects to the MongoDB server, then you lot will find below output along with other output:

                MongoDB trounce version v4.2.1 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("9684d709-821b-4064-9e27-e87f341b1d92") } MongoDB server version: 4.ii.1 Server has startup warnings: 2019-12-22T09:13:59.889+0530 I  Control  [initandlisten] 2019-12-22T09:13:59.890+0530 I  Command  [initandlisten] ** Alarm: Access control is non enabled for the database. 2019-12-22T09:13:59.890+0530 I  Command  [initandlisten] **          Read and write admission to data and configuration is unrestricted. 2019-12-22T09:13:59.891+0530 I  Command  [initandlisten] 2019-12-22T09:13:59.893+0530 I  Control  [initandlisten] ** Alarm: This server is jump to localhost. 2019-12-22T09:13:59.893+0530 I  CONTROL  [initandlisten] **          Remote systems will be unable to connect to this server. 2019-12-22T09:13:59.894+0530 I  CONTROL  [initandlisten] **          Get-go the server with --bind_ip <address> to specify which IP 2019-12-22T09:13:59.895+0530 I  CONTROL  [initandlisten] **          addresses it should serve responses from, or with --bind_ip_all to 2019-12-22T09:xiii:59.895+0530 I  Command  [initandlisten] **          demark to all interfaces. If this beliefs is desired, start the 2019-12-22T09:13:59.896+0530 I  CONTROL  [initandlisten] **          server with --bind_ip 127.0.0.1 to disable this alarm. 2019-12-22T09:xiii:59.897+0530 I  Command  [initandlisten] --- Enable MongoDB's free cloud-based monitoring service, which will then receive and display metrics about your deployment (disk utilization, CPU, operation statistics, etc).  The monitoring information will be available on a MongoDB website with a unique URL accessible to you and anyone yous share the URL with. MongoDB may use this data to brand product improvements and to suggest MongoDB products and deployment options to yous.  To enable free monitoring, run the following command: db.enableFreeMonitoring() To permanently disable this reminder, run the post-obit command: db.disableFreeMonitoring() ---  > utilize EmployeeDB switched to db EmployeeDB              

That's all. We accept installed MongoDB zippo version in windows.

Performing MongoDB Operations

Creating Database

Create a new database by using the below control on the MongoDB client terminal:

            > utilise EmployeeDB switched to db EmployeeDB          

Check database

            > db          

MongoDB Bones Commands

Show All Databases:

 Select Database to Work With:

            apply databaseName          

List down collections of the current database:

            show collections; db.getCollectionNames();          

Create a Collection:

            db.createCollection("collectionName");          

Insert a Document in a Collection:

            // Insert single certificate // db.<collectionName>.insert({field1: "value", field2: "value"}) // // Insert multiple documents // db.<collectionName>.insert([{field1: "value1"}, {field1: "value2"}]) db.<collectionName>.insertMany([{field1: "value1"}, {field1: "value2"}])          


Save or Update Document:

            // Matching certificate volition be updated; In instance, no document matching the ID is found, a new document is created db.<collectionName>.save({"_id": new ObjectId("jhgsdjhgdsf"), field1: "value", field2: "value"});          

Display Collection Records:

            // // Retrieve all records // db.<collectionName>.discover(); // // Retrieve limited number of records; Following control will impress 10 results; // db.<collectionName>.find().limit(10); // // Retrieve records by id // db.<collectionName>.find({"_id": ObjectId("someid")}); // // Retrieve values of specific collection attributes by passing an object having  // attribute names assigned to ane or 0 based on whether that attribute value needs  // to exist included in the output or non, respectively. // db.<collectionName>.detect({"_id": ObjectId("someid")}, {field1: ane, field2: i}); db.<collectionName>.detect({"_id": ObjectId("someid")}, {field1: 0}); // Exclude field1 // // Collection count // db.<collectionName>.count();          


Administrative Commands:

            // // Become the collection statistics  // db.<collectionName>.stats() db.printCollectionStats() // // Latency statistics for read, writes operations including average time taken for reads, writes // and related umber of operations performed // db.<collectionName>.latencyStats() // // Get collection size for data and indexes // db.<collectionName>.dataSize() // Size of the collection db.<collectionName>.storageSize() // Total size of document stored in the collection db.<collectionName>.totalSize() // Total size in bytes for both drove data and indexes db.<collectionName>.totalIndexSize() // Full size of all indexes in the collection          

Free Leap Kick Tutorial | Total In-depth Course | Learn Spring Boot in 10 Hours


Lookout this course on YouTube at Bound Boot Tutorial | Fee ten Hours Full Course

Source: https://www.javaguides.net/2019/12/install-mongodb-zip-in-windows.html

Posted by: gidleyanxiortampt.blogspot.com

0 Response to "How To Install Mongodb On Windows 8 64 Bit"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel