Read-only file system when attempting mkdir /data/db on Mac

后端 未结 16 2136
予麋鹿
予麋鹿 2020-12-07 10:28

I am trying to create a new folder in the main directory

Tried all kinds of examples

sudo mkdir /data/db

sudo mkdir -p /data/db<

16条回答
  •  醉话见心
    2020-12-07 10:47

    Default Paths for the mongodb-community Formula

    In addition to installing the MongoDB server and tool binaries, the mongodb-community formula creates:

    • a configuration file: /usr/local/etc/mongod.conf
    • a log directory path: /usr/local/var/log/mongodb
    • a data directory path: /usr/local/var/mongodb

    then it worked for me:

    mkdir -p usr/local/var/mongodb/data/db
    

提交回复
热议问题