Tech Junkie Blog - Real World Tutorials, Happy Coding!: MongoDB In-Depth: Setting Up And Starting MongoDB For The First Time

Sunday, June 6, 2021

MongoDB In-Depth: Setting Up And Starting MongoDB For The First Time

In the previous post we installed MongoDB on a Linux orperating system.  On this post we are going to setup the data folder that MongoDB needs and connect to MongoDB in the command line. 

Here are the steps:


  1.  Create a folder call /data/ then create another folder call db underneath it with the mkdir command, I've already created the folder so I can't do it on the command prompt again.
           But you basically run the following commands
               1.  mkdir /data
                2. mkdir /data/db

    2.  Now we want to start the MongoDB service with the command mongod --dbpath "/data/db"








    You only have to do this once, afterward you can just type mongod and the service should start.           You would need sudo rights to run these commands.

3. Now you can connect to you MongoDB instance with the mongo command








13 comments:

  1. Hi,
    Thanks for sharing this beautiful and informative article.
    I have really enjoyed reading the article and of course learned several new things from your content.
    I would definitely share this blog on my social media pages.
    Looking forward and waiting for your new blogs
    Thank you

    ReplyDelete
  2. “Hey ,

    You did an excellent job on this post! I’d like to add an extra productivity tip to your list if you don’t mind?

    https://www.fortunebusinessinsights.com/chatbot-market-104673



    Have a great day,
    Samarth J

    ReplyDelete
  3. Online PDF to Word converter free to convert documents online, Upload your file and transform it into Word in one click. Convert your Doc and Docx right now into Word and PDF format. Visit our Website!

    ReplyDelete
  4. App Dev Zone providing you many leading services, one way For All Design, to meet the marketing needs and Development. Including Logo Design, SEO services (SEO booster), WordPress Website Design and Hosting in all over World. Visit our Website to learn more!

    ReplyDelete
  5. Studio by TCS showcases carefully curated collections from an array of Pakistani designers and brings the best of Pakistani fashion to your doorstep. With the unparalleled strength and reliability of TCS’s logistics platform, Studio by TCS provides a seamless customer experience. We serve you with the same unflinching commitment to quality and customer service that has set TCS apart as a market leader for 34 years. With an eye on the future, Studio by TCS defines fashion in the digital age. Join us as we take Pakistani fashion global.

    ReplyDelete
  6. Hi,
    I Am At Filhaal,Owner.
    Thanks for sharing this beautiful and informative article.
    I have really enjoyed reading the article and of course learned several new things from your content.
    I would definitely share this blog on my social media pages.
    Looking forward and waiting for your new blogs
    Thank you

    ReplyDelete
  7. Hi,
    Thanks for sharing this beautiful and informative article.
    I have really enjoyed reading the article and of course learned several new things from your content.
    I would definitely share this blog on my social media pages.
    Looking forward and waiting for your new blogs
    Thank you

    ReplyDelete
  8. Hi........ I like to share this information with friends.
    https://apnagharapnejannat.000webhostapp.com/

    ReplyDelete
  9. https://apnagharapnejannat.000webhostapp.com/

    ReplyDelete
  10. best bizz is the UK most trusted website which provide list of leading businesses in the UK.Improvement agency, assisting with growing your business to be more profitable, sustainable and successful.. Visit our website to learn more!

    ReplyDelete
  11. . Chord Buzz is our blog is your passport everything from art to science, all under one digital roof.to a world of information and ideasJoin us in exploring

    ReplyDelete
  12. Listcrae emerges as a powerful solution for modern organisation management, addressing critical challenges related to task management, collaboration, and project execution.

    ReplyDelete

Search This Blog