MongoDB Manually config


MongoDB Manually config

macOS 10.15.x

path error

exception in initAndListen: NonExistentPath: 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.,
terminating 2020-07-16

--dbpath

no default config file exists???

https://github.com/docker-library/mongo/issues/136#issuecomment-274934620

# 手动指定
$ mongod --config /path/to/some/file.conf 
# OR
$ mongod -f /path/to/some/file.conf

https://docs.mongodb.com/manual/reference/configuration-options/#configuration-file

configuration-file

https://docs.mongodb.com/manual/reference/configuration-file-settings-command-line-options-mapping/

https://docs.mongodb.com/manual/administration/configuration/

error ???

$ mongod -f /usr/local/etc/mongod.conf

$ mongos -f /usr/local/etc/mongod.conf


solution

# write 权限

$ sudo chown -R `id -un` /System/Volumes/Data/data/db

# server
$ mongod --dbpath /System/Volumes/Data/data/db

# client
$ mongo

> show databases;

> quit();

MongoDB GUI

Robo 3T

https://robomongo.org/download

refs

MongoDB & macOS (install manually)

https://www.cnblogs.com/xgqfrms/p/9770091.html


Flag Counter

©xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM