How do you rename a MongoDB database?

In this tutorial, we will learn How to rename a MongoDB database. However, there is no such direct method available just like MySQL to rename the existing database but there is always a second way to do so and we complete using some specific Steps that we will learn below. Rename The Database In MongoDB … Read more

How Can I List All Collections In The MongoDB Shell?

Here We will discuss How can I list all collections in the MongoDB shell where there are two ways to get the important list of all the collections in the MongoDB Shell and the are get collections and show collections. Let’s understand all of them one by one. Collections are document or group of documents … Read more

How do I Drop A MongoDB Database From The Command Line?

In this tutorial, we will learn How to Drop A MongoDB Database From The Command Line to do so we can directly use the drop command to delete the whole database. Drop A MongoDB Database Drop a database means deleting a database permanently from a well defined database. And to drop permanently by a single … Read more

How To Query MongoDB With “like”?

In this Tutorial, we will learn How to query MongoDB with “like” which is used for finding the match for a string or a substring that might be present in a full string which could be there. To Query MongoDB With “like” We use like statements to find a match in between a substring or … Read more

How to Connect to Mongodb database server Locally and Remote

As per mongodb documentation, we can use the mongo command to access the database using below command – Connect to mongodb database locally $ mongo -u user1 -p password123 –authenticationDatabase admin mongo -u user 127.0.0.1/admin Connect to mongodb database Remotely To connect to mongo database remotely we need below steps – 1. you should have … Read more

%d bloggers like this: