Mongodb - Difference between running “mongo” and “mongod” databases

后端 未结 3 1321
悲&欢浪女
悲&欢浪女 2020-12-12 12:39

So, I\'m sure I\'m missing something simple here, but when I run mongo as a daemon (using mongod --fork or just mongod), I see different database content than if I just run

3条回答
  •  误落风尘
    2020-12-12 12:52

    Yes, this might be a naive answer to this question but I am putting it forward so people can understand it easily!

    Mongod:

    mongod

    (Short for Mongo Daemon) is a background process used by MongoDB server to get things done. This process is responsible for managing the whole MongoDB server tasks such as accepting requests, responding to users, managing memory requirement of MongoDB server operations and other things essential for MongoDB Server to run.

    TLDR; Basically it is the MongoDB server

    Mongo:

    Mongo

    on the other hand, is an interactive JavaScript shell interface to MongoDB, which provides a powerful interface for system administrators as well as a way for developers to test queries and operations directly with the database. mongo also provides a fully functional JavaScript environment for use with a MongoDB

    TLDR; Basically I think it as mongodb client which can be used as a shell to get access to MongoDB database server run my mongod instances

提交回复
热议问题