how to set mongod --dbpath

前端 未结 12 1764
囚心锁ツ
囚心锁ツ 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:37

    mongod  --port portnumber --dbpath /path_to_your_folder
    

    By default portnumber is 27017 and path is /var/lib/mongodb

    You can set your own port number and path where you want to keep all your database.

提交回复
热议问题