Mongodb启动失败1067错误

在开发中遇到MongoDB意外关闭后,重新启动时出现1067错误。尝试了国内博客的解决方案未果,通过谷歌搜索在3秒内找到正确答案。关键在于根据实际文件路径调整官方教程中的步骤,具体可参考官方文档:https://mongodb-documentation.readthedocs.io/en/latest/tutorial/recover-data-following-unexpected-shutdown.html。
摘要由CSDN通过智能技术生成

1、在一次开发中,mongodb意外关闭,再次启动时一直报1067错误,如下

The Mongo DB service is starting.
The Mongo DB service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

2、百度果然不行,搜到方案,大都是这种,也难怪国内博客抄袭乱象

mongod.exe --config E:\ruanjian\MongoDB\mongod.cfg --remove

mongod.exe --config E:\ruanjian\MongoDB\mongod.cfg --install

3、于是换用谷歌,3秒解决问题,

1) remove the file /data/db/mongod.lock

2) run mongod.exe --repair

3) start the mongod service net start MongoDB

4、3中的文件,根据自己文件的实际路径来处理
5、官方原文
https://mongodb-documentation.readthedocs.io/en/latest/tutorial/recover-data-following-unexpected-shutdown.html

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值