What is the default database path for MongoDB?

前端 未结 5 630
[愿得一人]
[愿得一人] 2020-11-29 01:29

I got an error about dbpath (/data/db/) does not exist, but /etc/mongodb.conf named it dbpath = /var/lib/mongodb. So, which is the de

5条回答
  •  情歌与酒
    2020-11-29 02:00

    I depends on the version and the distro.

    For example the default download pre-2.2 from the MongoDB site uses: /data/db but the Ubuntu install at one point used to use: var/lib/mongodb.

    I think these have been standardised now so that 2.2+ will only use data/db whether it comes from direct download on the site or from the repos.

提交回复
热议问题