查看: 31|回覆: 0

MongoDB Manually config

[複製鏈接]

4

主題

0

回帖

0

積分

热心网友

金币
0
閲讀權限
220
精華
0
威望
0
贡献
0
在線時間
0 小時
註冊時間
2009-6-8
發表於 2020-7-16 01:35:00 | 顯示全部樓層 |閲讀模式

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



©xgqfrms 2012-2020

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


回覆

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即注册

本版積分規則

相关侵权、举报、投诉及建议等,请发 E-mail:qiongdian@foxmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部