🍺 /usr/local/Cellar/mongodb/4.0.3_1: 18 files, 258.1MB
Cecils-MacBook-Pro:~ negro75$ mkdir -p /data/db
mkdir: /data/db: Permission denied
Cecils-MacBook-Pro:~ negro75$ > sudo chown -r 'id -un' /data/db
chown: illegal option -- r
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhv] [-R [-H | -L | -P]] :group file ...
Cecils-MacBook-Pro:~ negro75$ >> sudo chown -R $USER /data/db
chown: /data/db: No such file or directory
Cecils-MacBook-Pro:~ negro75$ mongo
MongoDB shell version v4.0.3
connecting to: mongodb://127.0.0.1:27017
2019-01-20T14:23:55.495+0100 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:257:13
@(connect):1:6
exception: connect failed
Cecils-MacBook-Pro:~ negro75$
This is what I tried last, as you can see it is not working.
Please can someone help me as I really need this working, I have a massive amount of work to do and I am held back by the fact I cannot create a database for mongodb.
Any help with this would be amazing as I have not been able to fix this problem.
Thank you
mkdir: /data/db: Permission denied
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/9616f501-934e-4f5a-86f1-2941fe60a288%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/60f7475c-967d-4e3f-b78a-522952b48677%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAPvQLyVo7L4dKvz8F65mi1bYA1gxJLFGh4E8_CpOfyi9gBXCVg%40mail.gmail.com.
sudo mkdir -p /data/db
sudo chown -R mongodb:mongodb /data/db
sudo chmod -R ugo+rwx /data/db
storage:
dbPath: /media/mongo/data
drwxr-xr-x 4 mongodb mongodb 34 May 9 2018 mongo
drwxr-xr-x 4 mongodb mongodb 16384 Jan 17 21:41 data
mongodb:x:111:65534::/home/mongodb:/usr/sbin/nologin