Why my "show dbs" command show two databases in newly created atlas cluster?

Hi, title says it all. I just newly created cloud atlas cluster and when I run command “show dbs” its showing two databases [admin] and [local], even though I’ve not created a single on myself. And one more thing I want to know is why is it showing a local database of 4.85 GB even though I’m connected to cloud cluster ?

Hey @Ahsan_72923

They are both created for you:

local

Every mongod instance has its own local database, which stores data used in the replication process, and other instance-specific data. The local database is invisible to replication: collections in the local database are not replicated.

In replication, the local database stores internal replication data for each member of a replica set.

admin

For storing administrative info like users.

For users created in MongoDB, MongoDB stores all user information, including name , password , and the user's authentication database , in the system.users collection in the admin database.

Thanks @natac13 for your response.

Hi @Ahsan_72923,

As @natac13 mentioned, these two databases are created by MongoDB for it’s internal use.

If you still have any query, feel free to get back to us. Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer

I’m still having confusion between Sandbox atlas cluster and Class atlas cluster ?
What is the difference between the two ?

Hi @Ahsan_72923,

The Class Atlas Cluster is owned by MongoDB and all the users have only Read Access to the databases in this cluster. You cannot perform Create, Update and Delete operation on the documents present in this cluster. This is so because we do not want any user to modify the contents of the databases and also to ensure every user has a consistent view of the data.

The Sandbox Atlas Cluster is created by each individual user such as you and you are the owner of this cluster with all the ReadandWrite access. In this cluster you load the video database and perform all sorts of CRUD operations.

If you still have any query, feel free to get back to us. Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer

1 Like

But why size of this DB is in GBs even though I’ve not inserted any data in it

@Ahsan_72923

If you are refering to the Class Atlas Cluster, well it is just that, a cluster of 3 nodes configured in a replica set. Therefore as the docs state, there is data stored in the local db for the replication process.

Also see the docs about collections stored in the local db on all mongod instances

1 Like