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

后端 未结 16 2079
予麋鹿
予麋鹿 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 11:05

    So, with macOS Catalina Apple created a new Volume for security purposes. If you’re on macOS Catalina, you'll need to create the /data/db folder in System/Volumes/Data.

    Follow these commands

    1. sudo mkdir -p /System/Volumes/Data/data/db
    2. sudo chown -R id -un /System/Volumes/Data/data/db

    Start MongoDB

    1. brew services run mongodb-community

    2. Enjoy

提交回复
热议问题