Homework 1.1. cannot connect

Hi Mentors,

I managed to up and running “database” machine.

Following tutorial I typed in
mongod to start a server

Then opened a new CMD and typed in mongo and voila, connection failed:

Any suggestions please?

You got an error saying /data/db was not found. You must fix this error first as mongod did not start.

Do you mean I need to create this directory on database machine?

Yes. All accessed directories must be created before starting the server.

I have created this directory /home/vagrant/data/db, but the problem still persists

Can you share the new log? Also, be aware your mongod is rather outdated. It’s in 4.4 now.

Seems like fixed this error by expplicitlystating the path

But I still cannot start a new shell

You are starting mongod on the vagrant VM but you try to connect with mongo from Windows using localhost. The vagrant VM is a different machine and the localhost on Windows is not the same as the localhost of the VM. You have to run mongo on the VM.

This is it. Thank you.