查看: 68|回复: 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:dzh188@hotmail.com

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

在本版发帖返回顶部