New to MongoDB Can not run command mongo

前端 未结 15 2303
孤独总比滥情好
孤独总比滥情好 2021-01-29 20:00

I was trying to run MongoDB:

   E:\\mongo\\bin>mongod
    mongod --help for help and startup options
    Sun Nov 06 18:48:37
    Sun Nov 06 18:48:37 warning:          


        
15条回答
  •  甜味超标
    2021-01-29 20:23

    After several attempts this works for me on Windows 7 env.:

    Initially directory to which you have copied all MongDB sources has such view:

    bsondump.exe
    mongo.exe
    mongod.exe
    mongod.pdb
    mongodump.exe
    mongoexport.exe
    mongofiles.exe
    mongoimport.exe
    mongooplog.exe
    mongoperf.exe
    mongorestore.exe
    mongos.exe
    mongos.pdb
    mongostat.exe
    mongotop.exe
    

    All you need is to add data directory and db directory nested( data/db ) Final view should look like this:

    data
    bsondump.exe
    mongo.exe
    mongod.exe
    mongod.pdb
    mongodump.exe
    mongoexport.exe
    mongofiles.exe
    mongoimport.exe
    mongooplog.exe
    mongoperf.exe
    mongorestore.exe
    mongos.exe
    mongos.pdb
    mongostat.exe
    mongotop.exe
    

    Than simply type in directory where MongoDB sources and data/db dirs exist this command:

    C:\my_mongo_dir\bin>mongod --dbpath .\data\db
    

提交回复
热议问题