8jhtza
Last Updated: February 25, 2016
·
505
· aceisscope
80d0f9d629ac1eb2b7ea30b2cb410cea

A Little Detour for MongoDB Installation on Mac OSX

Installing MongoDB is pretty easy, as long as you have homebrew, which can be done with one line command

$ brew install mongodb

However if you try to start a MongoDB daemon on your Mac OSX, most likely you will run into this error and fail to launch it.

error: dbpath (/data/db) does not exist

That means we mac users need something extra- to create such a path for MongoDB.

$ sudo mkdir -p /data/db
$ sudo chown `id -u` /data/db

Poof!

Say Thanks
Respond
Filed Under