so I just updated my OS to MacOS 10.15 and I've been trying to restart my mongodb service. Usually, I do it by typing mongod
. But I have been running into an error,
2019-10-18T16:37:47.573-0400 I CONTROL [initandlisten] MongoDB starting : pid=90637 port=27017 dbpath=/data/db 64-bit host=Hrishikeshs-MacBook-Pro.local
2019-10-18T16:37:47.574-0400 I CONTROL [initandlisten] db version v3.6.8
2019-10-18T16:37:47.574-0400 I CONTROL [initandlisten] git version: 6bc9ed599c3fa164703346a22bad17e33fa913e4
2019-10-18T16:37:47.574-0400 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2r 26 Feb 2019
2019-10-18T16:37:47.574-0400 I CONTROL [initandlisten] allocator: system
2019-10-18T16:37:47.574-0400 I CONTROL [initandlisten] modules: none
2019-10-18T16:37:47.574-0400 I CONTROL [initandlisten] build environment:
2019-10-18T16:37:47.574-0400 I CONTROL [initandlisten] distarch: x86_64
2019-10-18T16:37:47.574-0400 I CONTROL [initandlisten] target_arch: x86_64
2019-10-18T16:37:47.574-0400 I CONTROL [initandlisten] options: {}
2019-10-18T16:37:47.577-0400 I STORAGE [initandlisten] exception in initAndListen: NonExistentPath: Data directory /data/db not found., terminating
2019-10-18T16:37:47.577-0400 I CONTROL [initandlisten] now exiting
2019-10-18T16:37:47.577-0400 I CONTROL [initandlisten] shutting down with code:100
So like it says, it doesn't have a /data/db
. When I do sudo mkdir -p /data/db
, I get an error saying, mkdir: /data/db: Read-only file system
I read somewhere that the root folder on the new OS is no longer writeable. Can someone please tell me as to how I can get my mongodb service to start? Thank you.