Location>code7788 >text

MongoDB Installation and Configuration Navicat MongoDB Tools

Popularity:865 ℃/2024-10-11 17:27:45

I. Download MongoDB
1. Download URL:/try/download/community

Note: This document uses Windows and msi installations as examples
II. Installing MongoDB

Opening .msi files









Create a mongo directory anywhere on your hard disk that contains the

File content:# directory of stored data
dbpath=D:\mongo\data\db

ports

port=27017

Log appending method

logappend=true

Log file path

logpath=D:\mongo\log\

Installation to window process service name

serviceName=mongodb
A browser search for localhost: 27017 will bring up the
At the CMD command line, execute

Open a Windows terminal and switch to the installation directory

cd D:MongoDB\bin

Run --dbpath is the db directory you created yourself in the previous step

mongod --dbpath D:\mongo\data\db (location of the directory you just created)
Installing the MongoDB Service
Open Windows Services
Find MongDB and make sure it corresponds to the following image

Configuring Environment Variables
Open Settings-->System-->System Information-->Advanced System Settings

existSystem PropertiesPanel find Advanced - > Environment Variables

existsystem variableFind the Path in the

Add the MongoDB Bin file at the end, in the same location as the installation

Save and launch
Go ahead and type in cmd
net start MongoDB
Open cmd and type mongod --version for testing

The installation is successful if the db version appears
browser authentication

Third, configure the connection Navicat
New link in the upper left corner - > MongoDB
Host write localhost (the ip of the host where MongoDB is actually running, locally you choose localhost)

IV. Installation of Tools
MongoDB Tools download address:
/try/download/database-tools?tck=docs_databasetools
Unzip the tool to a local folder and copy all the files from the bin directory to the bin in the MomgoDB installation directory.

target folder

Open Navicat and connect to the database



Selecting implant and export brings up the

At this point, click Set Path--> select the corresponding file in the bin folder under the MongoDB installation directory.
(This can also be changed in Tools-->Options-->Environment above Navicat)
V. Test Export Json and Import
Right mouse click and select Mongoexport to open the export dialog box in the following way

Json file can be exported normally
Right-clicking and selecting MongoImprot to import would look like this