Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-7472

Comment on: "show dbs"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • None

    Description

      I am new to mongodb currently I'm learning from docs and tutorials available online, I need a clarification in certain Mongodb 'show dbs' command. I'm pretty sure that it would list all the databases that we've created.

      but there is a slight problem I'm facing with that command
      1. I've created a db using the following command
      use mytestdb
      2. Then I tried to view the current db using command
      db
      It shown my database name mytestdb
      3. finally when I'm trying to see the list of available databases i've created using
      show dbs
      but still the list didn't consist of my recently created database "mytestdb"

      I tried several time but the result is same, I searched about this similar problem in the internet I got two solutions which worked for me
      1. Restart mongo client
      2. Repair the db using db.repairDatabase() command

      Though it worked fine I just need to know why its not refreshing in the real time, is it a feature or a bug, if its a feature I just need to know why and if I am not doing something right please educate me. I'm so much fascinated to learn mongodb completely.

      Thank you so much in advance

      Attachments

        Activity

          People

            ravind.kumar Ravind Kumar (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 47 weeks, 2 days ago