02.Mongo DB - Download and install mongoDB

  



Download and install mongoDB


Go to https://www.mongodb.com/try/download/community and  download mongoDB.

Note: version 4.4.1 is only support in windows 10.If you want to install other versions of windows, please select an older mongo dB version.

 

Alter install go to bellow path…

C:\Program Files\MongoDB\Server\3.6\bin

Inside bin there are 2 excitable file can be seen.mongod.exe and mongo.exe

·       Mogod.exe. Mongo daemon which is going to run in the background it will accept the connections.

·       Mong.exe. command line shell from which you are going to work with your database.










 

Running mongoDB

If you want to run mogoDB, first you have to run mongod.exe then run mongo.exe.

To run, open C:\Program Files\MongoDB\Server\3.6\bin this location with cmd.

In the CMD, type monod.exe and press enter to run.පළමු පාර run කරන විට පහත error එක පැමිණේ.


That errors like that, please create this file (C:\data\db) and re execute the mongo.exe.

 

Then open this location in new CMD and execute mongo.exe.

When you execute the mongo.exe bellow part (connection accepted) can be seen on monod.exe executed cmd.

To test,

Type db and press enter.මෙය mongo.exe එක run වන CMD හි execute කරන්න.


නමුත් ඉහත පරිදි C:\Program Files\MongoDB\Server\3.6\bin location එකෙන් CMD  එක open  කරගෙන run කර කර ඉන්නට අවශ්‍ය වෙන්නේ නැ.ඒ සදහා environment variable එක set කරන්න.ඊට පස්සේ any location එකක ඉදන් database එකට අදාළ query run කරන්න  පුළුවන්.

Setting Environment variable.

Go to view advance system setting – environment variable – then select path and double click (select path and then click on edit) add C:\Program Files\MongoDB\Server\3.6\bin location at end. – OK

Then open the CMD from any location and do the above process agin.it will working fine.

ඉහත පරිදි mongoDB එක සමග CMD එක හරහා ගණදෙනු කල හැක(query execute කල හැක).SQL මෙය මෙලෙසම වන අතර නමුත් පහසුව පිණිස SQL සමග වැඩ කිරීමේදී GUI(graphical user interface) use කරනු ලබයි(MySQL Workbench , XAMP,WAP වගේ ඒවා).mongoDB  සමග ද පහසුවෙන් වැඩ කිරීමට මෙලෙස GUI use කර ගත හැක.

 

Download and install a GUI (MongoChef)

Go to https://studio3t.com/download/ and Download and install it.

 


Download MongoShell

Go to https://www.mongodb.com/try/download/shell and Download.

Then extract it.

Copy and paste extracted file in C drive (C:\mongosh-1.8.2-win32-x64).

Add its bin path to environment variables(C:\mongosh-1.8.2-win32-x64\bin).



Go to C:\mongosh-1.8.2-win32-x64\bin and run mongosh.exe.





Comments

Popular posts from this blog

09.Data Binding.

Database - Topics

02. Spring – Creating spring project clone it with GIT step by step.