zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    linux 杂类
    set
    C++ 基础 杂类
    linux 添加samba账户
    git 常用命令
    git 设置bitbucket 邮箱、用户
    C++ shared_ptr
    git 免密码配置
    2014的新目标
    为/Date(1332919782070)/转时间2013-09-23
  • 原文地址:https://www.cnblogs.com/jiajinyi/p/mongoDB.html
Copyright © 2011-2022 走看看