MongoDB is an open source, cross platform document-oriented database management system. It is a NoSQL database which stores data and schemas as JSON objects. Mongodb is developed by Mongodb Inc and is published under GNU affero General Public License and Apache.
MongoDB shell version: 1.8.1 connecting to: test Unless you also want to set up MongoDB on a Mac OS X machine, you can now skip the next part of this section and move on to 'Getting started', where you will learn how to interact with the MongoDB server using the shell client. Installing on Mac OS X. Download a free 14 days trial of Navicat for MongoDB and try the latest features in Navicat version 15. Navicat Download Navicat for MongoDB 14-day trial versions for Windows, macOS and Linux Products.
This tutorial describes the steps involved in the installation of MongoDB on MacOS
Prerequisites
- MacOS
- Login as an administrator on terminal.
- Homebrew must be installed on the system.
Installation
Following steps are used to install MongoDB on MacOS.
Download Mongodb 3.2
1) Update homebrew installer package
To get started with the installation of MongoDB on MacOS, we need to update the repository index of Homebrew package Installer. This will be done with the following command.
2) Install MongoDB
After updating the repository index, we need to install MongoDB which will be done with the help of homebrew installer. It simply installs the MongoDB on location /usr/local/Cellar/mongodb
3) Start MongoDB
Mac Mongodb Start
To start MongoDB, we need to run the following command.
4) Working on command line
The MongoDB shell can be accessed by running the file named as mongo which is a executable script located inside the bin folder under installation directory.
To create database, we use following command on the MongoDB shell.
5) Stop database
To stop database, we have to specify unload option with the launchctl command as follows:
Install Mongodb On Mac
Well, we have installed MongoDB version 3.4.9 successfully on our MacOS.