Where does MongoDB store its documents?

前端 未结 2 1648
隐瞒了意图╮
隐瞒了意图╮ 2021-02-03 23:11

I have inserted and fetched data using MongoDB, in PHP. Is there an actual copy of this data in a document somewhere?

2条回答
  •  没有蜡笔的小新
    2021-02-03 23:40

    By default Mongo stores its data in the directory /data/db.

    You can specify a different directory using the --dbpath option.

    If you’re running Mongo on Windows then the directory will be C:\data\db, where C is the drive letter of the working directory in which Mongo was started. This is quite confusing, so on Windows I’d recommend that you always specify a data directory using --dbpath.

提交回复
热议问题