Create db dir $ mkdir /usr/local/db Add user Please read the doc from mongodb Start server $ mongod --dbpath /usr/local/db --port 27963 --auth