I use this method to solve the problem:
sudo chown -R mongodb:mongodb /data/db
More Related Contents:
- How to remove array element in mongodb?
- How to execute mongo commands through shell scripts?
- pushing object into array schema in Mongoose
- How to copy a collection from one database to another in MongoDB
- Check if every element in array matches condition
- What is the default database path for MongoDB?
- How to aggregate sum in MongoDB to get a total count?
- mongo – couldn’t connect to server 127.0.0.1:27017
- Merging two collections in MongoDB
- What is the best way to store dates in MongoDB?
- Matching ObjectId to String for $graphLookup
- How to work around the lack of transactions in MongoDB?
- MongoDB-CR Authentication failed
- What’s the $unwind operator in MongoDB?
- Mongodb aggregation lookup with conditions
- Order of responses to MongoDB $in query? [duplicate]
- Get the latest record from mongodb collection
- Collision probability of ObjectId vs UUID in a large distributed system
- Changing MongoDB data store directory
- Mongoose limit/offset and count query
- Read-only file system when attempting mkdir /data/db on Mac [closed]
- mongodb move documents from one collection to another collection
- How does the order of compound indexes matter in MongoDB performance-wise?
- Multiply field by value in Mongodb
- How does MongoDB order their docs in one collection? [duplicate]
- count array occurrences across all documents with mongo
- How to do pagination using range queries in MongoDB?
- MongoDB Single Document size limit is 16MB
- mongodb aggregate query isn’t returning proper sum on using $sum
- MongoDB aggregate by field exists