Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
371 views
in Technique[技术] by (71.8m points)

Data directory /data/db not found even after creating the folder to use mongodb

I am having dificulty getting mongodb up and running on my local mac. To make a long story short, after following instructions to set everything up, when I run mongod from the commend line, I get a variety of info returned, the most significant of which looks to be this:

th: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file."}}

So then I tried creating this directory like so:

sudo mkdir -p /data/db

Doing so returns this:

mkdir: /data/db: Read-only file system

Then, when I run mongod again, I'm back to where I started - with a series of messages, including this one again:

th: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file."}}

I am running this on Catalina 10.15.3.

What am I missing here?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...