VSCode MongoDB Official Extension to Connect & Execute Queries and Display MongoDB Tables & DB
Mar 2, 2025
Get the full source code of application here:
Watch My Visual Studio Code IDE Setup Video For Fonts,Themes & Extensions
https://youtu.be/Bon8Pm1gbX8
Hi Join the official discord server to resolve doubts here:
https://discord.gg/cRnjhk6nzW
Visit my Online Free Media Tool Website
https://freemediatools.com/
Buy Premium Scripts and Apps Here:
https://procodestore.com/
Show More Show Less View Video Transcript
0:00
uh hello guys welcome to this video so
0:02
in this video I will show you how to
0:04
connect mongod DB database directly
0:06
inside your vs code and show tables
0:08
collections all that stuff execute
0:11
queries so there is an official plug-in
0:14
which is available in vs code if you
0:16
just type in the extensions tab mongodb
0:19
this extension will come mongodb for vs
0:22
code it's developed by Bono TV UC see
0:24
it's a verified extension almost 2
0:27
million installs click the install
0:30
button and as soon as it installs
0:33
here now you will actually be redirected
0:38
you will see this mongod DB appearing in
0:40
the
0:41
sidebar just click it and here you need
0:44
to basically make the connection so let
0:48
me just remove this connection and start
0:50
from scratch so here you will click this
0:53
add mongod DB connection and here you
0:56
will simply connect it with a connection
0:58
string and uh or you can go to advance
1:02
option as well open this and by default
1:06
it will look something like this mongodb
1:08
Local Host by default it runs on this
1:11
port number
1:14
27017 and just click on Save and connect
1:17
and just make sure that your
1:20
network
1:21
is so I have Compass here running
1:26
if you
1:28
see so I will just start this click on
1:36
connect uh just make sure that uh this
1:39
connection it is saying
1:41
refused if this error comes right here
1:44
then just what you need to do you need
1:48
to go to services and just search for
1:51
this service which is mongod
1:58
DB if you see the this is actually the
2:01
service mongodb server just make sure
2:04
that it is
2:06
running click on the start here so it
2:08
will actually start your mongod DB
2:10
server and now it is running right here
2:13
and just click it click on connect and
2:16
now you will see your mongod DV will
2:19
be started and again click on Save and
2:23
connect and now you will see the mongod
2:24
DB is
2:25
connected so now all the database tables
2:29
will come right here guys which you have
2:31
created the database will show right
2:34
here in the vs code and you can click on
2:38
any collection right
2:43
here
2:47
so if you have any sort
2:51
of it will look something like this this
2:53
is your collection here mongodb
2:57
collection so
3:01
and you can even go to uh create new
3:03
playground as well click this option and
3:06
here you can directly execute mongodb
3:09
queries so this is actually your
3:11
playground right here mongodb playground
3:13
so first of all it gives you with this
3:16
default setting it creates a new
3:19
database by using this code and then it
3:21
creates some collections which is Tables
3:24
by using this insert Manu and then it
3:27
actually get collection find
3:30
some data right here so there is a run
3:32
button right here if you click the Run
3:34
button this query will get executed so
3:37
let me show you by proof If I open
3:40
mongodb
3:42
compass and just
3:45
connect and as I click this query button
3:49
you will see this connection will this
3:52
query will get executed and as soon as
3:54
it does you will see a new database will
3:56
get
3:57
added mongod DV VK playground if I
4:02
refresh so if you see now you have
4:05
created this database mongodb remotely
4:09
so it contains the sales collection
4:11
which contains these sample records out
4:15
there so in this easy way guys you can
4:17
directly execute mongod DB queries
4:19
directly inside your vs code and get all
4:22
these collections data right here and
4:25
uh now if you want to remove this so so
4:30
there is this REM
4:33
drop database here so we can directly
4:36
pass this name mongodb playground so
4:39
what it now does if you execute
4:46
this so it actually
4:48
removes so now if you see that database
4:52
will get deleted so no longer that
4:54
database is present so you can create
4:57
delete you can cury data using this
5:00
extension it's a very good extension for
5:02
specifically for mongodb it's developed
5:04
by the mongodb developers so you can
5:07
connect the instance and
5:09
directly play with the mongod DV
5:11
database so thank you very much guys for
5:13
watching this video and also check out
5:15
my website as well free mediat tools.com
5:18
which contains thousands of tools
5:20
regarding audio video and image and I
5:22
will be seeing you in the next video
#Programming
#Software
#Internet & Telecom
