how to set mongod --dbpath

前端 未结 12 1760
囚心锁ツ
囚心锁ツ 2020-12-29 19:50

very new to mongodb and databases in general. whenever i run mongo i receive this error message: ​​​

MongoDB shell version: 2.         


        
12条回答
  •  天涯浪人
    2020-12-29 20:24

    Have only tried this on Mac:

    • Create a data directory in the root folder of your app
    • cd into your wherever you placed your mongo directory when you installed it
    • run this command:

      mongod --dbpath ~/path/to/your/app/data

    You should be good to go!

提交回复
热议问题