New to MongoDB Can not run command mongo

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

    After installing the MongoDB you should manually create a data folder.

    By default MongoDB will store data in /data/db, 
    but it won't automatically create that directory. To create it, do:
    
    $ sudo mkdir -p /data/db/
    $ sudo chown `id -u` /data/db
    
    You can also tell MongoDB to use a different data directory,
    with the --dbpath option.
    

    For more detailed information go to MongoDB wiki page.

提交回复
热议问题