MongoDB Installation — MongoDB Client

Setting-up MongoDb and utilizing via graphical user interface client.

Danish Siddiq
tajawal
3 min readSep 27, 2019

--

In part II of this series, modeling in NoSQL was covered in detail with multiple examples. This article will cover installation:

  1. MongoDB Installation
  2. Installing GUI for MongoDB server — Supported tool.
No Idea, why using this image but article requirement : )

If tools are already installed on your system then you can jump directly to the next article:

1. MongoDB installation on macOS:

Follow the mentioned steps.

* Manually:

MongoDB site has the link to download the specific version as per OS and compression requirements.

* Brew:

In case you are like dealing from terminal then “brew” is a good option. In case if you don’t have brew then first install and type below commands:

  1. brew update
  2. brew tap mongo/brew
  3. brew install mongodb or brew install mongodb@preferred-version

* Configurations:

  1. Create “db” directory, where files reside by typingmkdir -p /data/db
  2. Provide permissions bysudo chown -R `id -un` /data/db
  3. Start MongoDB server by mongod
  4. Open another tab access server data from mongo shell by mongo

MongoDB installation on windows:

https://docs.mongodb.com/v3.2/tutorial/install-mongodb-on-windows/

It’s super easy to install through the .msi file. During installation, an option is available to change the MongoDB default location for storing data and log files from the following dialogue.

Image is for the MongoDB version 4.0, at time of writing version is 4.2

You can launch MongoDB from a .exe file, or from the terminal:

"C:\Program Files\MongoDB\Server\3.2\bin\mongod.exe"

Even if you forgot to change the location during installation, still you got an option to use different data location by passing a path at the time of starting MongoDB server from terminal.

"C:\Program Files\MongoDB\Server\4.2\bin\mongod.exe" --dbpath d:\test\mongodb\data

2. Robo 3T/Studio 3T — GUI for MongoDB

Although MongoDB shell is available to access from the terminal, GUI’s are always been more user-friendly.

I prefer working with either Robo 3T or Studio 3T, other options are also available as per preferences.

After installation, connect to MongoDB server from Robo 3T/Studio 3T:

Hurrah, MongoDB and other basic tools are installed, the next article focuses focus on writing basic and advanced queries in MongoDB:

--

--