New to MongoDB Can not run command mongo

前端 未结 15 1940
孤独总比滥情好
孤独总比滥情好 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:19

    You just need to create directory in C:. as C:\data\db\

    Now just start mongoDB:

    C:\Users\gi.gupta>"c:\Program Files\MongoDB\Server\3.2\bin\mongod.exe"
    2016-05-03T10:49:30.412+0530 I CONTROL  [main] Hotfix KB2731284 or later update is not installed, will zero-out data files
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten] MongoDB starting : pid=7904 port=27017 dbpath=C:\data\db\ 64-bit host=GLTPM-W036
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten] db version v3.2.6
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten] git version: 05552b562c7a0b3143a729aaa0838e558dc49b25
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1p-fips 9 Jul 2015
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten] allocator: tcmalloc
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten] modules: none
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten] build environment:
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten]     distmod: 2008plus-ssl
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten]     distarch: x86_64
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten]     target_arch: x86_64
    2016-05-03T10:49:30.414+0530 I CONTROL  [initandlisten] options: {}
    2016-05-03T10:49:30.427+0530 I -        [initandlisten] Detected data files in C:\data\db\ created by the 'wiredTiger' storage engine, so setting the active storage engine to
    2016-05-03T10:49:30.429+0530 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(f
    chive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
    2016-05-03T10:49:30.998+0530 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
    2016-05-03T10:49:30.998+0530 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory 'C:/data/db/diagnostic.data'
    2016-05-03T10:49:31.000+0530 I NETWORK  [initandlisten] waiting for connections on port 27017
    2016-05-03T10:49:40.766+0530 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:57504 #1 (1 connection now open)
    

    It will then run as service in background.

提交回复
热议问题