WEBVTT

00:00.240 --> 00:05.460
Moving on, assuming that you have installed the MongoDB on your local system and expecting that you

00:05.460 --> 00:09.760
have done that or otherwise maybe are using cluster, which is the Atlas.

00:09.780 --> 00:14.940
The one thing that I always recommend to everyone is to have a visualization of the database.

00:14.940 --> 00:18.150
Most of the programmer prefer to have their database and thus the terminal.

00:18.150 --> 00:23.550
That is also a good approach, but having a visual over the database sometimes gives you an added advantage

00:23.550 --> 00:24.660
in debugging the code.

00:24.660 --> 00:26.670
That's majorly what we do all the time.

00:26.880 --> 00:28.530
So in this video I'll show you that.

00:28.530 --> 00:32.310
What are the tools that are available for us for doing the exact same thing?

00:32.310 --> 00:37.890
If you go up in here into the MongoDB dot com, you're going to find that they provide you a couple

00:37.890 --> 00:39.060
of products here as well.

00:39.060 --> 00:42.390
So if you click on the software, they have a lot of great softwares.

00:42.390 --> 00:48.120
One that is going to be needed for this one is Compass, which is a joy for MongoDB.

00:48.120 --> 00:54.480
And the great thing is MongoDB obviously knows that the audience is greatly scattered around all the

00:54.480 --> 00:55.230
operating systems.

00:55.230 --> 01:00.240
So if you click on Try Now, they give you access of their software into all different OS.

01:00.240 --> 01:06.090
It can be OS X, which is my system in my case, but it can be Windows seven or Ubuntu RedHat, whatever

01:06.090 --> 01:07.080
you are going on.

01:07.080 --> 01:08.700
The installation is pretty simple.

01:08.700 --> 01:09.600
Just click click next.

01:09.600 --> 01:13.050
Agree or for the mac user just drag and drop.

01:13.260 --> 01:13.980
Once you do.

01:13.980 --> 01:18.450
So, what it's going to give you is a similar kind of a compass.

01:18.450 --> 01:21.930
This is really nice and beautiful and this is what you get exactly.

01:21.960 --> 01:29.760
It is pre-filled by MongoDB colon slash slash local host colon 27017, which is a default port for MongoDB.

01:29.790 --> 01:33.930
You can click on edit and modify that also, but the default string is good enough.

01:33.930 --> 01:39.570
If you are saying nothing, just go ahead and enter that MongoDB colon slash slash localhost call on

01:39.570 --> 01:41.130
to 7017.

01:41.130 --> 01:42.180
That's the default.

01:42.240 --> 01:45.930
If you click on the Connect, you will be able to connect with your database.

01:46.110 --> 01:51.220
Locally installed mine is having few extra extra here like LCF faster.

01:51.300 --> 01:54.540
These are some of the crash courses on YouTube, so don't worry on that.

01:54.540 --> 01:57.300
By default you're going to see admin and config.

01:57.300 --> 02:01.740
That's the two that you'll be seeing I guess local also, but these are the two that you'll definitely

02:01.740 --> 02:02.370
see that.

02:02.700 --> 02:07.980
And you need to just go up here at the very top where you see MongoDB click on the Connect and Disconnect.

02:07.980 --> 02:12.090
Mine is a little bit out of the area of recording screen, so that's why I cannot show you.

02:12.090 --> 02:14.880
It's actually in the top bar here and my screen is big.

02:15.000 --> 02:16.980
So this is what we have here.

02:16.980 --> 02:22.350
But obviously we want to try to connect with the cluster as well, the online one, that's also super

02:22.350 --> 02:22.650
easy.

02:22.650 --> 02:25.740
Just make sure you follow a couple of interesting steps here.

02:25.740 --> 02:31.710
So when I go up into this deployment, make sure first an important one is the network access.

02:31.710 --> 02:36.150
You are able to see 000 means allowed to access from anywhere.

02:36.150 --> 02:39.450
That's important and somebody needs to have a database access as well.

02:39.450 --> 02:41.460
So a username or password is required.

02:41.460 --> 02:47.040
Once that is done, just click on the databases and click on Connect and make sure you are not clicking

02:47.040 --> 02:48.480
on Connect with the application.

02:49.020 --> 02:53.730
Because we are not connecting with the application, we are connecting with MongoDB, although the string

02:53.730 --> 02:56.250
are very, very similar, but there's a small difference.

02:56.250 --> 03:01.380
So if you click on the connect, then you see that we have the my first database and retrials and a

03:01.380 --> 03:02.040
whole lot of that.

03:02.040 --> 03:07.290
But if I go back and click on the compass here, the string is a little bit smaller here, so that's

03:07.290 --> 03:08.850
what we need in this case.

03:08.850 --> 03:11.100
Let's go ahead and click on copy.

03:11.310 --> 03:12.720
So you ought to is being copied.

03:12.720 --> 03:14.580
I'm going to go ahead and click on edit.

03:14.760 --> 03:16.970
This will reveal your credential now issue.

03:17.040 --> 03:20.490
I'm pretty sure you won't be doing anything bad with my credentials, I assume.

03:20.610 --> 03:25.380
Let's click on confirm and you can also go ahead and click on fill in connection fields.

03:25.380 --> 03:27.420
Individually, you can go ahead and do that.

03:27.420 --> 03:32.580
I'm going to go ahead and paste this up here and replace my password with actual password.

03:32.700 --> 03:37.890
Now, in case your password is having some of the extra unique characters or something, you need to

03:37.890 --> 03:40.080
format that string in that format.

03:40.080 --> 03:44.760
So as characters needs to come into that because it's kind of a URL connection that we have, click

03:44.760 --> 03:49.470
on the Connect and sometimes you're going to see these kinds of errors don't really this is an error

03:49.470 --> 03:51.480
just related to the compass.

03:51.750 --> 03:53.910
This is not going to bother you too much.

03:53.910 --> 03:56.580
You just need to copy this.

03:56.580 --> 03:59.640
Let's go ahead and try to have a new connection.

03:59.640 --> 04:03.690
So I'm going to go ahead and click on New Connection and the New Connection, just paste this again

04:04.380 --> 04:06.540
and we need to replace this password.

04:06.540 --> 04:11.400
This is a very common an error in the MongoDB world, so don't worry too much, just try to connect.

04:11.400 --> 04:15.120
And yeah, sometimes it just requires a new connection to be opened up.

04:15.540 --> 04:17.160
Make sure there is a plus three.

04:17.160 --> 04:22.980
There is a lot of knowledge that needs to be done here with these service and replicas.

04:22.980 --> 04:24.180
I won't be going in that.

04:24.480 --> 04:26.520
So this is all that we have in the connection.

04:26.520 --> 04:29.670
If I go ahead and create a database, I can just go ahead and create that.

04:29.670 --> 04:30.840
I can use the existing one.

04:30.840 --> 04:33.630
So that's the basics of it and nothing big deal.

04:33.630 --> 04:36.540
And you can go ahead and click on Connect and Disconnect.

04:36.720 --> 04:40.740
So a couple of interesting stuff that you have seen, especially the error that is very important for

04:40.740 --> 04:41.220
you to see.

04:41.220 --> 04:44.250
Make sure you just click on New Connection and try it again and that's all.

04:44.370 --> 04:45.540
So that is basically it.

04:45.540 --> 04:49.470
Most of the time we'll be using the localhost, so I'll be connecting the local host one and we'll give

04:49.470 --> 04:55.170
you a little bit more insight that how the database is being performing or even how we are connecting

04:55.170 --> 04:59.670
it, how the entries are going into that, how our data, our entries are deleting their.

04:59.840 --> 05:01.780
A lot more things that we need to go ahead.

05:01.790 --> 05:05.480
So that's all the tour of the guy for the MongoDB.

05:05.480 --> 05:07.280
And let's catch up in the next video.
