Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongodb启动报错MongoDB:shutting down with code:100 #172

Open
itgoyo opened this issue Jul 21, 2019 · 1 comment
Open

Mongodb启动报错MongoDB:shutting down with code:100 #172

itgoyo opened this issue Jul 21, 2019 · 1 comment

Comments

@itgoyo
Copy link
Owner

itgoyo commented Jul 21, 2019

1、首先我们创建一个数据库存储目录 /data/db:

sudo mkdir -p /data/db

配置.cfg(data/db)文件之后再次启动即可

mongod --config F:\mongoDB\data\mongod.cfg  --serviceName MongoDB --install(如果没有mongod.cfg文件,请看下面的配置)
注:
配置mongod.cfg文件-->直接在data目录下创建名为mongod.cfg文件,内容如下:
## 数据库文件目录
dbpath=F:/mongoDB/data
## 日志目录
logpath=F:/mongoDB/log/mongo.log
diaglog=3
@itgoyo
Copy link
Owner Author

itgoyo commented Jul 26, 2019

ps aux | grep mongod
查看当前那个 pid 正在启动 mongod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant