How to install Mongodb 5 | latest MAC installation

Поделиться
HTML-код
  • Опубликовано: 31 июл 2024
  • Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.
    All the learning resources such as code files, documentations, articles and community discussions are available on our website:
    chaicode.com/
    You can find our discord link, github link etc on the above website.
    Twitter/X link: x.com/hiteshdotcom
    Discord link: hitesh.ai/discord
    Learn React with 10 projects: • Let's learn react from...
    Learn Docker: • A practical guide on D...
    Learn Kubernetes: • Complete Kubernetes Co...
    How does a browser works: • How does a browser wor...
    How nodejs works: • How node JS works | En...
    Learn Redux-toolkit: • Learn Redux Toolkit in...
    Learn NextJS: • Nextjs Full stack course
    Learn Typescript: • Why to learn Typescript
    Learn Javascript: • Welcome to new JavaScr...
    Learn React Native: • React Native Mastery: ...
    Learn Zustand: • React state management...
    Learn Golang: • How to get started wit...
  • НаукаНаука

Комментарии • 143

  • @HiteshChoudharydotcom
    @HiteshChoudharydotcom  2 года назад +22

    After brew installation, here are commands:
    xcode-select --install
    brew tap mongodb/brew
    brew install mongodb-community@5.0
    brew services start mongodb-community@5.0
    brew services stop mongodb-community@5.0
    mongod --config /opt/homebrew/etc/mongod.conf --fork
    mongosh

    • @kushagrakesav
      @kushagrakesav Год назад

      MongoDB compass

    • @PerpetualPreponderer
      @PerpetualPreponderer Год назад

      This is interesting, in that there is something programming related that's actually EASIER to install on Windows than Mac!

    • @Antobarbunz
      @Antobarbunz Год назад

      i don't have the "/opt/homebrew/etc/mongod.conf" file...
      during the installation i saw this:
      "/usr/local/etc/mongod.conf" so i used that path.. but the result is:
      ERROR: child process failed, exited with 1
      EDIT: i had to use "sudo"... howevere the last version (6.0.x) seems to be different someway... so installed the 5.0 as in the video, and i also had to export this to PATH with:
      export PATH="$PATH:/usr/local/Cellar/mongodb-community@5.0/5.0.11/bin"
      Without this, "mongod" command was an uknown command

    • @venkatasaiprasadbhumireddy2314
      @venkatasaiprasadbhumireddy2314 Год назад

      When installing Homebrew I got error: git ...[file..]

    • @tgbois
      @tgbois Год назад +3

      Sir ,
      Enterted in termial : mongod --config /opt/homebrew/etc/mongod.conf --fork
      showing an error : Error opening config file '/opt/homebrew/etc/mongod.conf': No such file or directory

  • @emrealca5538
    @emrealca5538 Год назад +5

    This was super helpful, I was getting really frustrated trying to install mongodb, and this walked me right through the steps I needed

  • @liliyao317
    @liliyao317 Год назад

    Thanks so much for the help, I've been struggling with the whole MongoDB installation thing, after watching your video, everything is fixed. Subscribed!

  • @abdulkaderlokhandwala7737
    @abdulkaderlokhandwala7737 2 года назад

    Best Video! I was struggling so bad! Thanks a ton Hitesh!

  • @ashwin.kulkarni
    @ashwin.kulkarni Год назад

    This was a saviour. Thanks Hitesh for this video

  • @taha7shaikh
    @taha7shaikh 8 месяцев назад

    THanks a million! this is what i needed from past 2 hours

  • @albertomenendezrodriguez6439
    @albertomenendezrodriguez6439 Год назад

    Man, your video save me from hours looking for a answer, thank you very much for your very helpull explanation!

  • @Nikhil-qi4oz
    @Nikhil-qi4oz 2 года назад

    very clear and comprehensive explanation

  • @daniyaragaltsov531
    @daniyaragaltsov531 Год назад

    Wow! Very Clear explanation

  • @zafariqbal92
    @zafariqbal92 Год назад

    Thank you Hitesh Choudhary !!!

  • @abcreation8371
    @abcreation8371 Год назад

    Thanks Really struggled installing it to start learning MongoDB

  • @arefinhossain9758
    @arefinhossain9758 Год назад

    Thanks Hitesh. It was realy helpful

  • @akashrana8874
    @akashrana8874 Год назад +5

    at last it is saying "mongod command not found after typing this code , "mongod --config ................" etc etc
    PLEASE HELP

  • @jamathchakka5279
    @jamathchakka5279 Год назад

    Really it's a good video, Loved the tutorial :P

  • @Surviving_With_Nthangeniph
    @Surviving_With_Nthangeniph Год назад

    Thanks for putting effort in your craft

  • @binet23
    @binet23 Год назад +1

    Not sure if I'm supposed to create a file or directory I got the following error message
    Error opening config file '/opt/homebrew/etc/mongod.conf': No such file or directory
    when I entered the following command mongod --config /opt/homebrew/etc/mongod.conf --fork

  • @user-ly5zd2ro7h
    @user-ly5zd2ro7h Год назад

    Thanks friend, it helped me a lot, prosperity to your channel and more subscribers!
    Liked it =)
    All the best!

  • @mansidongre8384
    @mansidongre8384 Год назад +3

    hello i am trying to do it but after ls -la , its not showing .zshrc anywhere ...what to do now

  • @anirudhcodes
    @anirudhcodes 2 года назад

    Always latest and updated 👌

  • @IT_PrajwalJanbandhu
    @IT_PrajwalJanbandhu 2 года назад

    after starting mongodb community the background process command is not working in mac m1, it says zsh: command not found: mongod ,
    can you please tell me what is the problem with this and how can i resolve i had this issue from the last 4 5 days but unable to resolve please help me out.

  • @eh9278
    @eh9278 Год назад

    when I type xcode-select --install or xcode-select ... it says that xcode-select is not a command, but I have command line tools installed in the right place, I even reinstalled it. Any thoughts?

  • @sidforreal
    @sidforreal 2 года назад +1

    In the tools tier list, Brew should definitely come in God Tier.
    BTW have you watched that Programming Language tier list Video by Clement? It's hilarious!!

  • @sultanbaimukhanov8823
    @sultanbaimukhanov8823 Год назад

    thank you, the video has helped me

  • @michaelrandle3370
    @michaelrandle3370 Год назад

    not to be dramatic but i almost had a mental break down trying to get this sh*t, thank you so much

  • @BANDLAHYNDAVIBCE
    @BANDLAHYNDAVIBCE 9 месяцев назад

    can you please help me with this issue mongod --config /opt/homebrew/etc/mongod.conf --fork
    about to fork child process, waiting until server is ready for connections.
    forked process: 10477
    ERROR: child process failed, exited with 1
    To see additional information in this output, start without the "--fork" option.

  • @ProlificOldGuy
    @ProlificOldGuy Год назад

    Thank you very helpful

  • @Dt1234a
    @Dt1234a 11 месяцев назад +2

    Hi Hitesh,
    Awesome video, you just save me countless hours here try to get this mongodb server install. Everything works as the video said, but when I run this command,
    mongod --config /opt/homebrew/etc/mongod.conf --fork
    I got an error message as follow :
    zsh: command not found: mongod
    Could you please advice on why I got this error message ?
    Thanks

  • @suraj4522
    @suraj4522 Год назад +4

    Finally after 2-3 days successfully installed it
    Quick tip if you are using intel processor then use this for config - mongod --config /usr/local/etc/mongod.conf

    • @randa5839
      @randa5839 Год назад

      about to fork child process, waiting until server is ready for connections.
      forked process: 9076
      ERROR: child process failed, exited with 48
      To see additional information in this output, start without the "--fork" option.

  • @abekaid9527
    @abekaid9527 Год назад

    Whats the difference between mongod and this method?

  • @usamafiaz4629
    @usamafiaz4629 Год назад

    mongod --config /opt/homebrew/etc/mongod.conf --fork
    The above command generates an error...
    Error opening config file: Is a directory
    try 'mongod --help' for more information
    What should i Do?

  • @vireshkariappa2732
    @vireshkariappa2732 Год назад

    There is an error called - No available formula with the name "mongodb-community@5.0" in the mac

  • @heisenberg3488
    @heisenberg3488 5 месяцев назад

    mongod --config /opt/homebrew/etc/mongod.conf --fork ,,, after this command its saying zsh: command not found: mongod can anyone help? what to do other process is done similarly as in video

  • @lakshyasadhwani9694
    @lakshyasadhwani9694 9 месяцев назад

    Thanks bhaiya for this. Was trying to install this from last 1 hour. Love from hindi channel chaiaurcode

  • @Pavankumar_Mhaske
    @Pavankumar_Mhaske 2 года назад +1

    ❤️ thanks sir

  • @rheza6496
    @rheza6496 Год назад

    what is the xcode tools for? is it necessary?

  • @srbinod
    @srbinod 9 месяцев назад +1

    i can not find a file with the .zshrc

  • @saibalaji4713
    @saibalaji4713 Год назад

    Is MongoDB native M1 version or it runs on rosetta?

  • @wassup102
    @wassup102 Год назад

    thank you so much sir

  • @pranitha4772
    @pranitha4772 4 месяца назад

    I don't have zshrc in my hidden files what can I do?

  • @gauravbawa5609
    @gauravbawa5609 Год назад +2

    in my directory after installing the command from brew, .zshrc (folder not there) other two forlder of zsh are there
    what should i do now?

  • @shivbhanpatel2727
    @shivbhanpatel2727 Год назад

    Thanks hundreds of ton

  • @muhammadtalhabaig4908
    @muhammadtalhabaig4908 Год назад

    Thank You!

  • @js2070
    @js2070 Год назад

    Hello Sir, it's showing zsh command not found. How to get rid of this? Plz help sir.

  • @AnshumanBisoyi
    @AnshumanBisoyi Год назад +3

    Thanks but why "mongo --version" command doesnt work? It says zsh: command not found: mongo

  • @vasanthreddy8361
    @vasanthreddy8361 Год назад

    i was unable connect mongodb with nodejs .But the mongodb is working properly .

  • @BANDLAHYNDAVIBCE
    @BANDLAHYNDAVIBCE 9 месяцев назад

    when i have used mongod --config /opt/homebrew/etc/mongod.conf --fork it is showing like mogod not found

  • @vaibhav_naik
    @vaibhav_naik 2 года назад +1

    Hi Hitesh sir, sorry for asking a question unrelated to the video but I am not able to watch the lco content on my Google Chrome in linux recently. The error message mentions that it is accessible on Chrome OS, windows or Mac. But the majority of developers use Linux as their go to OS. So it is getting very hard to watch the content on the laptop.
    I had raised a support query for this on lco support page as well but never received any reply from the team.
    Could you please allow the videos to be watched on linux as well?

    • @HiteshChoudharydotcom
      @HiteshChoudharydotcom  2 года назад +1

      You need to install DRM packages for your linux distro. and update, that's it. Or you can use widewine or similar package

    • @vaibhav_naik
      @vaibhav_naik 2 года назад

      @@HiteshChoudharydotcom thank u sir for such an instant response 🙏🫡. Will try that out.

  • @shangeethss5012
    @shangeethss5012 Год назад +7

    % mongod --config /opt/homebrew/etc/mongod.conf --forK
    zsh: command not found: mongod
    WHAT TO DO ??

    • @harshdasila6680
      @harshdasila6680 Год назад

      kuch pta chala bhai iska?

    • @daniyaragaltsov531
      @daniyaragaltsov531 Год назад

      1) run
      echo 'export PATH="/opt/homebrew/opt/mongodb-community@5.0/bin:$PATH"'
      2)run
      source ~/.zshrc
      3) run/check
      "mongo --version"

  • @sams_sharma
    @sams_sharma Год назад +1

    for intel chip user the path and command will be mongod --config /usr/local/etc/mongod.conf --fork.

  • @ks8411
    @ks8411 Год назад

    thank you man

  • @WEOOLTECNOLOGY
    @WEOOLTECNOLOGY Год назад

    Thank You sir

  • @vaibhavverma480
    @vaibhavverma480 2 года назад +2

    Sir I am having error that says child process failed and exited with error no 48... Do you have any solution for this? Please answer

    • @nikhilyadav3987
      @nikhilyadav3987 Год назад +3

      first stop the mongodb services as Hitesh did before fork command

  • @HimanshuYadav-2414
    @HimanshuYadav-2414 10 месяцев назад

    I am not getting the .zshrc file

  • @gauravkale2377
    @gauravkale2377 Год назад

    i Like it bro

  • @deepakksingh1306
    @deepakksingh1306 Год назад

    i am not getting the path i am getting :wq at that place
    at 2:41 time

  • @buzzedbrain
    @buzzedbrain Год назад

    I have Anaconda 3 set up already. Does that change anything for me as far as the path reassignment goes?

    • @lianaaghamalyan6211
      @lianaaghamalyan6211 Год назад

      same issue, even deleted Anaconda but the content of the file didn't change

  • @vaishnomatabhaktamandali2000
    @vaishnomatabhaktamandali2000 2 года назад

    where to check mongo db logs

  • @harshdasila6680
    @harshdasila6680 Год назад +1

    8:00 its showing mongod command not found

  • @aniketjoshi7817
    @aniketjoshi7817 Год назад

    sir plz tell us how to install Cassandra Database on MAC

  • @isi1044
    @isi1044 2 года назад +2

    please help .... i do not have that .zshrc file after installing home brew

    • @andrewvarela4387
      @andrewvarela4387 Год назад

      I have same problem. Were u able to figure this out?

  • @vimalsuresh541
    @vimalsuresh541 2 года назад

    Can you make a video on installation of VM's on m1.

  • @arunmohanty6725
    @arunmohanty6725 Год назад

    How install jdk in mac air

  • @_Soulzeal
    @_Soulzeal 2 года назад +8

    Brew is installed but Can not find .zshrc file on mac !! Can u help?

    • @siddojisaiprathyusha5579
      @siddojisaiprathyusha5579 Год назад +1

      Did u find .zshrc file

    • @julazac
      @julazac Год назад +1

      Same issue. Can somebody help with this? Error says : no such file or directory

    • @OptimusPrime-js1zf
      @OptimusPrime-js1zf Год назад

      Make sure u r looking In Correct directory.
      Use `cat ~/.zshrc`
      Also verify which shell u r working on using `echo $0`

  • @albertabhisheksingh9567
    @albertabhisheksingh9567 2 года назад +2

    When i'm typing cat .zshrc, i'm getting bash fg: %: no such job, can someone help

    • @iam_ram_
      @iam_ram_ 2 года назад

      Yes same here

  • @ranaimranahmed2532
    @ranaimranahmed2532 2 года назад

    Plz complete series on mongo

  • @olegmaz3969
    @olegmaz3969 2 месяца назад

    Thanks

  • @jahezjohn7776
    @jahezjohn7776 Год назад

    mongod --config /opt/homebrew/etc/mongod.conf --fork is not working for me ... its showing command not found : mongod

  • @mahbubhussain7992
    @mahbubhussain7992 2 года назад

    Thanks for the video. requesting to continue this by mentioning the data location and log location.

    • @mohamedahmedfouda6714
      @mohamedahmedfouda6714 Год назад

      For Macbook M1
      Data Directory /opt/homebrew/var/mongodb
      Configuration file /opt/homebrew/etc/mongod.conf
      Log directory /opt/homebrew/var/log/mongodb

  • @kmaximoff
    @kmaximoff Год назад

    Now question is, how to uninstall it?

  • @daanyal-rahila-memon
    @daanyal-rahila-memon 2 года назад +2

    Sir, There's not any .zhrc file in my Mac. Can you please help me out?

    • @daanyal-rahila-memon
      @daanyal-rahila-memon 2 года назад

      .zshrc file*
      But there are .zsh_history & .zsh_session

    • @oleg07010
      @oleg07010 2 года назад +2

      @@daanyal-rahila-memon Same issue with my mac. M1 Mac Pro

    • @fdlrahman07
      @fdlrahman07 Год назад

      @@daanyal-rahila-memon just follow the steps its gonna be ok

  • @abhishekkumar7205
    @abhishekkumar7205 Год назад

    Helpful

  • @tanmaywani4474
    @tanmaywani4474 Год назад

    mongod command not found

  • @anonymousking9076
    @anonymousking9076 2 года назад +2

    Hello sir I have enrolled in your job guarantee js program. I am a college student thinking of buying a M1. Can I run all software for web Dev and machine learning on m1.

  • @sohailmirzadeveloper
    @sohailmirzadeveloper Год назад

    thanks❤

  • @jeancarlosinisterra9725
    @jeancarlosinisterra9725 Год назад +3

    I would like to add this process give you a clear process to install MongoDB only in MacOs with the new M1 chips.
    I had some troubles installing it because there is not longer bash. If you are using bash, you need to change the Path (Can consult with echo $PATH in your Terminal) after that you must edit your files in .zshrc

    • @luckykritya941
      @luckykritya941 Год назад +1

      Can you please elaborate? I am using Mac with M1 chip and when I'm opening .zshrc it contains data like this:
      # !! Contents within this block are managed by 'conda init' !!
      __conda_setup="$('/Users/luckykritya/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
      if [ $? -eq 0 ]; then
      eval "$__conda_setup"
      else
      if [ -f "/Users/luckykritya/opt/anaconda3/etc/profile.d/conda.sh" ]; then
      . "/Users/luckykritya/opt/anaconda3/etc/profile.d/conda.sh"
      else
      export PATH="/Users/luckykritya/opt/anaconda3/bin:$PATH"
      fi
      fi
      unset __conda_setup
      #

  • @AlejandroHuertasjah29
    @AlejandroHuertasjah29 Год назад

    Tks!!

  • @nathanzagaurangga1247
    @nathanzagaurangga1247 Год назад +9

    why i can't find .zshrc file on my laptop?

  • @vrajCpatel
    @vrajCpatel Год назад

    zsh: command not found: mongod

  • @saxzphone
    @saxzphone 11 месяцев назад

    It is much easier to install MongoDB using docker for local development. But there are downsides of course.....

  • @zsoltardai
    @zsoltardai Год назад

    Yeey, a video that explains everything and I should not read the documentation. 🤣

  • @imamansoni
    @imamansoni 2 года назад

    Hmm MacBook pro m1 struggling to stream 4k, intresting 😀

  • @khaftabuddinahmed1634
    @khaftabuddinahmed1634 2 года назад

    Use docker instead :)

  • @HarisKhan-uo5kl
    @HarisKhan-uo5kl 2 года назад

    ERROR: child process failed, exited with 14
    I need help

  • @neontuts5637
    @neontuts5637 2 года назад

    Hi Hitesh sir, Please can you make the same video for Windows? without loosing any data on mongodb.

  • @normc.1118
    @normc.1118 Год назад

    Don't know why I purchase macbook air. Should have sticked with old windows and none of the issues i've run into trying to get this mongdb working would have happened. Really frustrating trying to get this to work. Think I'm giving up. Don't have the time for this crap.

  • @harshitgupta2305
    @harshitgupta2305 2 года назад

    it says ERROR: child process failed, exited with 48

  • @shashank_1107
    @shashank_1107 2 года назад +1

    Bhai JavaScript wala to continue karo

  • @sadev0
    @sadev0 2 года назад

    postgress
    redis
    mysql

  • @abhicomic
    @abhicomic Год назад

    Dbeaver is the best

  • @lakshminarayanananbalagan7065
    @lakshminarayanananbalagan7065 Год назад

    mongo compass

  • @developmenttesting9625
    @developmenttesting9625 Год назад

    mongodb compash

  • @lostsunrises7495
    @lostsunrises7495 Год назад

    you are a monGOD

  • @SaiRushik
    @SaiRushik 7 месяцев назад +1

    Is this ur default accent or r u just trying to be cool

  • @KrishnaSingh-ci9zz
    @KrishnaSingh-ci9zz Год назад

    MongoDB Compass

  • @mohammedfaraazahmed2234
    @mohammedfaraazahmed2234 Год назад

    mongod --config /opt/homebrew/etc/mongod.conf --fork
    Error opening config file '/opt/homebrew/etc/mongod.conf': No such file or directory
    try 'mongod --help' for more information
    I am getting this err, please help me out someone

  • @Aman-Verma
    @Aman-Verma Год назад +1

    make sure to run this command -> brew link mongodb-community@5.0

  • @wilfriedmambou5200
    @wilfriedmambou5200 Год назад

    if you have zsh command not found : mongo
    make
    vim .zshrc and add
    export PATH=/usr/local/opt/mongodb-community@5.0/bin:$PATH
    for intel
    or for M1
    /opt/homebrew/Cellar/mongodb-community@5.0/5.4.13/bin/mongo (or someting like this iam not sure )
    and run
    source ~/.zshrc for reload the terminal

  • @tanushsingh2782
    @tanushsingh2782 10 месяцев назад

    mine consists the path to anaconda but still brew is working fine. Just curious
    cat .zshrc :
    # >>> conda initialize >>>
    # !! Contents within this block are managed by 'conda init' !!
    __conda_setup="$('/Users/tanush/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
    if [ $? -eq 0 ]; then
    eval "$__conda_setup"
    else
    if [ -f "/Users/tanush/opt/anaconda3/etc/profile.d/conda.sh" ]; then
    . "/Users/tanush/opt/anaconda3/etc/profile.d/conda.sh"
    else
    export PATH="/Users/tanush/opt/anaconda3/bin:$PATH"
    fi
    fi
    unset __conda_setup
    #

  • @luckykritya941
    @luckykritya941 Год назад +1

    When I'm opening the .zshrc that file doesn't contain any path instead it contains this:
    # >>> conda initialize >>>
    # !! Contents within this block are managed by 'conda init' !!
    __conda_setup="$('/Users/luckykritya/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
    if [ $? -eq 0 ]; then
    eval "$__conda_setup"
    else
    if [ -f "/Users/luckykritya/opt/anaconda3/etc/profile.d/conda.sh" ]; then
    . "/Users/luckykritya/opt/anaconda3/etc/profile.d/conda.sh"
    else
    export PATH="/Users/luckykritya/opt/anaconda3/bin:$PATH"
    fi
    fi
    unset __conda_setup
    #

    • @smarikamalviya57
      @smarikamalviya57 Год назад

      hey, i am getting the same error
      how u worked on it?? pls help

  • @MuhammadBilal-rm6yn
    @MuhammadBilal-rm6yn 11 месяцев назад

    please give your email i have some queries.