Categories
JavaScript Answers

How to install and run MongoDB on Mac OS?

Spread the love

To install and run MongoDB on Mac OS, we install MongoDB with brew install.

We run

brew install mongodb

to install mongodb.

Then we make folder to hold the Mongo data files with

mkdir -p /data/db

Then we set permissions with

sudo chown -R `id -un` /data/db

We then run the server with

mongod

We run the Mongo command line utility with mongo.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *