mongodb show database command linux 1

mongodb show database command linux

show databases
show dbs

Here is what the above code is Doing:
1. Connect to the MongoDB server
2. Create a database called “mydatabase”
3. Create a collection called “customers”
4. Insert a document into the “customers” collection
5. Find all documents in the “customers” collection
6. Find one document in the “customers” collection
7. Delete the document that you inserted
8. Delete the “customers” collection
9. Delete the “mydatabase” database

Similar Posts