What is mLab and How to use it..


What is mLab??

               mLab is a fully managed cloud database service featuring automated provisioning and scaling of MongoDB database.


mLab has following features. 

  • Backup and recovery
  • 24/7 monitoring and alerting
  • Web-base management tools
  • Export Support
  • Free up to 500mb usage
                   
                    mLab's Database-as-a-Service platform powers hundreds of thousands of databases across AWS, Azure, and Google and allows developers to focus their attention on product development instead of operations.


How to use mLab..!


Step 1) Set up a mLab Account. 

           To get started with mLab u need to create a mLab account and login to that account. Then you can add as many database subscriptions as you want.
 


















Step 2) Create a database Subscription.

           After you have created your account add a new database subscription. Get started quickly at no cost with a free sandbox database. 

img-newsub


















Step 3) Connecting to your new database

 In a terminal window, connect to your database using the mongo shell.
 example :- % mongo ds012345.mlab.com:56789/dbname -u dbuser -p dbpassword

You can grab your connection info after logging into your account and navigating to the database homepage

img-connectstring











Here is a one example to how mLab connected to nodejs application.


























Step 4) Load Data to the database.

Here’s a quick exercise that tests an insertion into your new database:
  1. Assuming you successfully connected using the mongo shell in the previous step, run the following command:
     > db.person.insert({ "Name" : "Damith" })
    
  2. Next, run the command in the first line below and confirm that the shell output matches the second line (your “_id” value will be different):
     > db.person.find()
     { "_id" : ObjectId("526705b4a3559a176784b4af"), "Name" : "Damith" }

Comments

Popular posts from this blog

Assignments and Grades integration in Moodle LMS - LTI 1.3 (With client_credentials base OAuth 2.0)

Cross Site Request Forgery Protection