mongoDB

本文介绍了如何在Windows环境下启动MongoDB数据库,并提供了解决MongoDB意外关闭导致无法再次启动的问题的方法。

1. Run mongoDB in Windows,

In command prompt, go to folder which include mongod.exe, then type: 

        mongod.exe --dbpath D:/mongoDB/db, and click enter.

If you can see

[initandlisten] MongoDB starting : pid=xxxx port=xxxxx dbpath=xxxxxxxx 32-bit.

That means mongoDB is running now. Then open a new command prompt , and type mongo.exe, you should see:

MongoDB shell version: x.x.x

connecting to: test 

MongoDB running successful. 

 

2.  mongoDB closed unexpectedly,

  If mongoDB close unexpected, when you want to run it again, you will see message like:

  ************

   old lock file: D:/mongoDB/db/mongod.lock. probably means unclean shutdown recommend removing file and running --repair

  ************

  We can repair this problem as message write. Remove file mongod.lock from D:/mongoDB/ and D:/mongoDB/db/, then run

  mongod.exe --repair

  OK, problem resloved.

 

转载于:https://www.cnblogs.com/jiajinyi/archive/2011/07/15/mongoDB.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值