How to use MongoDB atlas to save data ?
Last Updated :
25 Dec, 2020
As modern applications require a database for storing data, MongoDB is a great choice. MongoDB Atlas is the global cloud database service for modern applications. We can use it for storing our application data on its server.
Follows these steps for how to use MongoDB Atlas for saving data:
Step 1: Visit the URL https://www.mongodb.com/cloud/atlas You will be shown the page given below.

Step 2: Click on the Sign In button present in the top right corner of the page. You will get the following page.

Step 3: Now if you haven't signed up already click on the Sign Up hyperlink. You will be taken to a new page as shown below.

Step 4: Fill in all the details and click on the Sign Up button. You will see a new page as shown below.

Step 5: Now click on the Continue button and you will see a new page as shown below.

Step 6: Now click on the Create a cluster button present in the Shared Clusters div if you want to use the service for free (You can choose plans as per your need), then the following will be the next page.

Step 7: By default, the selected Cloud Provider & Region will be AWS. Now click on Create Cluster and you are all set to create and use an online database.

Step 8: Now click on the Create your first database user checkbox from the dialog box shown in the bottom-left corner.

Step 9: Click on the Add New Database User button. And now you will see the following dialog box.

Step 10: Enter the name and password for the new database user and create on the Add User button and the dialog box will disappear.
Now click on the Network Access hyperlink present in the Data Storage section. You will see the following page.

Step 11: Click on the Add IP Address button and you will see the following page.

Step 12: Now just click on Allow Access From Anywhere and then click on the Confirm button. Now go to Clusters hyperlink and you will see the following page.

Step 13: Click on the Connect button as marked in the above picture and the following dialog box will appear.

Step 14: Click on the Connect your application part and then you will see the following dialog box.

Step 15: At last, now choose the appropriate driver and version then copy the link and paste in your code. Replace <password> with the password you entered while creating the new database user and <dbname> with the name of Database (Remember Database, not Database user).
This is how we can create our own storage space for our application using MongoDB Atlas.
Similar Reads
How to Connect to MongoDB Atlas Using Shell? MongoDB is a highly scalable NoSQL database, renowned for its ability to manage vast amounts of complex and unstructured data. Unlike traditional databases that use a tabular format, MongoDB employs a document-oriented approach, storing data in a flexible, JSON-like format. This makes MongoDB highly
5 min read
How To Use the MongoDB Shell The MongoDB Shell, also known as mongosh is a powerful command-line interface that allows users to interact with MongoDB databases. It provides a REPL (Read-Eval-Print Loop) environment that facilitates database management, data manipulation, and administrative tasks with easeIn this comprehensive g
7 min read
How to Connect Node to a MongoDB Database ? Connecting Node.js to MongoDB is a common task for backend developers working with NoSQL databases. MongoDB is a powerful, flexible, and scalable database that stores data in a JSON-like format. In this step-by-step guide, we'll walk through the entire process from setting up your development enviro
6 min read
How to Connect to a MongoDB Database Using Node.js MongoDB is a NoSQL database used to store large amounts of data without any traditional relational database table. To connect to a MongoDB database using NodeJS we use the MongoDB library "mongoose". Steps to Connect to a MongoDB Database Using NodeJSStep 1: Create a NodeJS App: First create a NodeJ
4 min read
How to Connect Node.js To MongoDB Atlas Using Mongoose? MongoDB Atlas is a cloud-based database service that offers robust features and scalability for managing our data. Here we will use Express.js for the server framework and Mongoose for interacting with MongoDB. And also we use the Ejs for our front end to render the simple HTML form. In this tutoria
6 min read
How to Post Data in MongoDB Using NodeJS? In this tutorial, we will go through the process of creating a simple Node.js application that allows us to post data to a MongoDB database. Here we will use Express.js for the server framework and Mongoose for interacting with MongoDB. And also we use the Ejs for our front end to render the simple
5 min read
How to Back Up and Restore a MongoDB Database? MongoDB is considered one of the classic examples of NoSQL systems. Its documents are made up of key-value pairs, which are the basic unit of data in MongoDB. Whether we're dealing with accidental data loss, hardware failures, or other unforeseen issues, having a solid backup and restoration plan ca
5 min read
How to create new Mongodb database using Node.js ? mongodb module: This Module is used to performing CRUD(Create Read Update Read) Operations in MongoDb using Node.js. We cannot make a database only. We have to make a new Collection to see the database. The connect() method is used for connecting the MongoDb server with the Node.js project. Please r
1 min read
How to Use MongoDB and Mongoose with Node.js ? MongoDB is a popular NoSQL database that offers flexibility and scalability, making it an excellent choice for modern applications. Mongoose, a powerful ODM (Object Data Modeling) library, simplifies the interaction between MongoDB and Node.js by providing a schema-based solution for data validation
6 min read
How to Retrieve Data from MongoDB Using NodeJS? MongoDB, the most popular NoSQL database, is an open-source document-oriented database. The term âNoSQLâ means ânon-relationalâ. It means that MongoDB isnât based on the table-like relational database structure but provides an altogether different mechanism for the storage and retrieval of data. Thi
3 min read