V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐工具
RoboMongo
推荐书目
50 Tips and Tricks for MongoDB Developers
Related Blogs
Snail in a Turtleneck
zxCoder
V2EX  ›  MongoDB

mongodb 的元数据是保存在哪的?

  •  
  •   zxCoder · Dec 4, 2020 · 2428 views
    This topic created in 1978 days ago, the information mentioned may be changed or developed.

    以 collection 的形式吗?还是直接是保存在二进制数据文件中,比如我show dbs show collections,这些数据都是在哪读取的,比如用户角色,用户授权这些数据信息,都是保存在哪的,有专门的数据库或者表存储吗

    我需要去看源码吗,文档好像没有提及

    Supplement 1  ·  Dec 5, 2020

    比如我创建一个新的数据库,这个数据库的名字,集合个数,占用存储等等这些数据是保存在哪的,直接保存在数据文件里吗,有没有一个专门的集合来存储这些数据

    3 replies    2020-12-04 19:43:37 +08:00
    rrfeng
        1
    rrfeng  
       Dec 4, 2020
    你是管理员的话 show dbs 就能看到啊,不是你建的那俩就是放元数据的。
    zxCoder
        2
    zxCoder  
    OP
       Dec 4, 2020
    @rrfeng 我在 admin 数据库下没找到。。。。`show collections`也只有 system.users 和 system.version,网上说的 system.namespaces index 都没有
    zxCoder
        3
    zxCoder  
    OP
       Dec 4, 2020
    @rrfeng 我用的是一个角色为 root 的账号
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   809 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 22:14 · PVG 06:14 · LAX 15:14 · JFK 18:14
    ♥ Do have faith in what you're doing.