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

后端 未结 16 2114
予麋鹿
予麋鹿 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:55

    If you are on mac and facing the issue then below command is useful, whoami variable will get the current user

    mongod --dbpath=/Users/$(whoami)/data/db
    

提交回复
热议问题