You Don't Need MySQL Clients Anymore! You Can Use VSCode Instead

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone in this video we're going to see how you can turn your vs code and use it instead of like mysql like something like mysql workbench or mongodb campus or even the postgres admin in here or even like you know the mysql stuff so you can use vs code to access and manage all of your type of databases including mysql or postgres or mongodb throughout only vs code and without leaving your code editor how cool is that as of course you can have all of this and you can access tables you can put queries you can run queries you can alter tables drop tables delete of them you can like have views and stuff and most importantly you can connect to different types of databases from postgres from like ssh you can you can access to another remote server you can do windows server you can do redis many many stuff so all of this using vs code so let's go ahead and see how you can do that [Music] so the main extension or the awesome extension we're going to be using is called my sequel it's not the first one it's the the my sequel from like the sea regen guy in here which sorry from spelling name but this extension is so so good it provides you with an user interface that is easily and interactive and of course you can run the commands as you would do like you type in your own you know row sql commands or queries and most importantly this allows you basically to connect to different types of databases like you can go mysql postgresql you can mongodb like for nosql windows server there's a variety of supported you know stuff like even elastic searches this actually supported with redis which makes it a super awesome solution i'm i'm definitely in love with this particular extension because it gives you so much flexibility and you can do all of that inside of vs code and while i'm talking about vs code and why i said that you can use vs code instead of my sql yes i mean it because here you can use vs code from now on to access and manage your databases instead of going like to the mysql cli or like the poster cli or even using the software that comes with mysql which is supported from like workbench which is officially made by oracle and mysql or something like the postgres admin 3 which is the software that comes with postgres or even the mongodb campus which is you know the software that allows you to manage and gives you a graphical user interface so all of those right here you don't need to to use any of them you need to install any of them right here you can just simply have vs code install the extension add a connection so this extension you can obviously go ahead and add this particular connection like local mysqldb for example that the postgres sql or even the no d like the no sequel for the mongodb in here after adding the connection you can have access to all the tables you can do pretty much everything that you want to do at a basic level of course on on doing this of course you can compare this to something like workbench because workbench has so many stuff like server stuff and so many custom tools and stuff like that i'm not advising to completely ditch this off but for us developers i find myself that like 99 or say 90 of the times all i do when i open up workbench or just want to access my sql database is actually i want to look up on the tables or something i want to look what the tables compose for example we got here this database called servicing it has this particular tables it has a couple of them admins customers images and stuff so i want to simply look on what those are made of so i can just like you know expand this and i find all the attributes and the different types it has why i need to look further and of course you take you click on it and it's going to grab you all the data you want pretty simple right that is so so good it's so convenient now that's why i want to use it and the second reason that i find the most important is you don't need to install all of this software from this postgres admin which is i'm not in love with by the way because the ui and everything doesn't really look good and yeah the font and everything is not my my style so i don't need to do that i can just do it from like you know vs code and it can have the user interface doing it for me if i want to do basic stuff of course or if not i can use the cli and it's so much better on all of these but the point is i don't need to go ahead and learn how this you know postgres admin stuff work from like scratch i need to like you know do a new learning curve learn how this interface works what the icons means on top in here it will be so ridiculous same works for basically the mysql workbench you need to go ahead and learn how this interface is made of like uh like you know have a new user experience what is this what the tools are how to add a new table how to query and yada yada you don't need to do that even for the mongodb campus even though it's one of the best software i've ever used for like a database software is still so much stuff to learn from and if you just compare this to vs code we all as developers use vs code as daily developers we always always use vs code as you know day from day to day or every single day we get up we power on vs code and we start like having it so we are so familiar with the ui and the basic user experience of vs code so we can simply use that and without any problems vs cad is going to rescue us just like using mysql in here connecting all the databases mongodb or whatever without installing separate software and you have to learn it all the way again so for basically to access your database you click on the plus button in here and it's going to give you this interface you can use like my sql postgresql you know different other databases you can even use ssh and keep it up in here so you can ssh to your custom server or something or even ftp for my sequel of course you can just type in the host which is 177 and everything that is the current mysql server running uh locally in here you type in like what the databases you want to connect and just like use by default or you can you know have it as this by default and of course the password click connect and you're basically good to go so this will be added and you can add as many instances as you want as many servers as you want and if you want to access a specific database you click on it it's going to become like active and everything and you got a bunch of stuff for example in here you got like the tables you can just expand that so you can find different tables if you want to see like the different attributes that composes a specific table on that for example customers has this particular attributes like the id is variable character of 36 uh the role is an integer and everything uh for example we want to take a look on this offer services you got the points images as well that's pretty pretty sweet anyways once you click on it it's going to give you the full selection and this is this is basically the sql query that has already run and you can basically select all of these different stuff from it without any problems so all the way all the way if you want to just go ahead and select that so you want to like open up a query and you type in the query yourself you click on this empty one it's going to open up a new kind of file for you which is you know dot sql file and here you can run whatever it's clearly has already populated with us like you select everything from offered services as services if you run the sql query either from here or from the top in here or you click control and enter it's going to open up a second view and it's going to run this particular one from it so if you want to only select let's say i want to select the id and the title i want to control enter and there you go it looks so so good and this by the way happens all in vs code which makes it so so good and of course we're all familiar with vs code and how to like to close and open up to you know side views in here and how to like you know minimizing everything it's so good we all know vs code and we all can use it and of course i can i can use the command palette to do whatever i wanna else do uh from from this particular service it's it's so convenient like to use this on vs code instead of going to learn in other software for me at least in my own opinion i would use vs code instead of all the others and just like compare vs code is just you know another compared to all the other kind of like soft turns and stuff like that so vs cad has a completely hundred percent win over different other sources and even the cli where sometimes the cli is very important so you've got all of these cut like features and stuff like that you can use it in vs code even like you have something like views so you can create your own custom ic reviews or procedures or even functions then you can store them right here and you can run those functions whenever you want for example you can create different types of functions and those functions can basically like you know have some cd that you want to enter inside or like you know drop some debugging data from from the database tables you want you can have them inside this function and whatever you want you click and run the function and you got it for example the views in here and you can have like specific views that does some inner joinery stuff which is this one in here it's actually doing some inner join for this particular specialist view so it's clearly see what it's doing in here uh just grabbing me this this particular one from the view but if you like when i want to look into this more particularly just like this is what what the view has so now this is like a separate table i'm not gonna go into the details with this but this looks so convenient and it's so so easy to manage in one place through vs code and you can manage all your databases tables and attributes and everything and let's say you want to create a new table you click on the plus in here and it's going to prop you with this like create table and everything and you can enter up the whole sql query it's only populated it has like already a template to it so you can just add and of course this template is automatically and particularly generated for this particular table because he knows what the stuff that are already used so yeah it can it can basically have all of that like at the create time and update time and stuff like that you can have it all in this particular place uh if you want to take a look on the table itself in here like the different tables and let's say i want to add a new admin you click on the plus and of course you get this awesome pop-up i'm pretty sure the style is in the grades and this has a lot to develop but yeah it's doing it pretty sweet with filtering yes it works you want to see like filtering and how how the eye diesel feature all the titles are filtered yes currency it works pretty pretty well you can do uh you know like whatever a car or something service you can filter that out and you can search yes that is doable as well or you want to even select all of these and actually like delete one of them you click that you delete and you're going to drop something or delete that completely out of the table and it's going to take care of the database itself so this happens all again in vs code but when it comes to nosql stuff for example for mongodb you go to the nosql and of course you've got to add a connection as well that is the same way just selecting the different database type and for that once you do the connection you're going to have like the different collections inside of that particular database because it's no sequel so no tables anymore but for example we've got this netflix and we can access movies and as soon as you click on this you're gonna give grab you all the documents available inside of that particular collection so seriously this is all the sci-fi movies and everything that we've got like from inception done and mentioned impossible and all of those inside of this like you're just showing me all of that and it's it's looking pretty good from the ui if you want to like do a query you can do that pretty simple you can do like local uh query in here and it's gonna like do db logo local mongodb uh or you can choose whatever the db which is has already been chosen for us automatically and you can of course check the collection i want to use the netflix connection um or or sorry the movies collection and you can just do like find and everything and this this would all work on this so here for the i want to choose netflix as a database and you can do limits and everything you can run sql query and of course it's going to bring you all of that so if you want to like do something particular like i want to limit only two when we got through objects yeah that would work because that is all being put in the inside of a query and that's actually being like you know in the run time has been created the mongodb and he got us the all the you know the available rows depending on the query provided so this all works inside of vs code and you need to you don't need something to use like something like canvas even though this one is a pretty good software and everything but i don't really like going through this because you need to learn like how the software works the user interface you need to look for different buttons on how to do stuff in here and there which isn't super ideal for me as a developer so i want to achieve stuff quickly as possible i don't need to memorize a lot of stuff and i can use something i already know something like vs code that is well maintained it's pretty good and i can use this awesome extension integrated with vs code i got the same ui the same user experience and more importantly the same look and feel that i'm used to use on vs code whenever i'm developing and doing something so this has a 10x10 for me and this is why what i was telling you on how to use it so hope you guys enjoyed this one hope you liked this particular one that was actually a simple video for me uh so this one like a quick video just showing you this extension and how you can use actually vs code instead of something like my sequel workbench or anything but this was a great alternative and this is definitely you must have extension and put it inside of your list as we're seeing here i got a bunch of them but anyway guys hope you guys enjoyed see you all in the next one [Music] [Music] [Music] you
Info
Channel: CoderOne
Views: 209,764
Rating: undefined out of 5
Keywords: VSCode, Visual Studio Code, vs code debugging, vs code debugging javascript, vs code extensions, vs code, web development, web dev, React VSCode, visual studio code mysql, MySQL, Database, VSCode MongoDB, vscode postgesql, postgresql cli, workbench, mysql workbench, workbench vscode, use vscode, learn vscode, master vscode, beginner vscode, web dev 2022, mysql extension, vscode dev, visual studio, visual studio code development, visual studio code beginners, HTML, Programming
Id: MkSgscvxaU8
Channel Id: undefined
Length: 13min 56sec (836 seconds)
Published: Mon Oct 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.