Installing MySQL and Creating Databases | MySQL for Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's going on everybody today we are going to be starting our MySQL tutorial [Music] series now the entire MySQL series will be broken up into three smaller series we'll have our beginner our intermediate and are Advanced this lesson is the very first lesson in the beginner Series where we're going to walk through all of the beginner or the basics of MySQL today we're going to be setting everything up so we'll be installing MySQL and then creating our database that we'll use to actually learn my SQL now before we get started I wanted to let you know that I created three full MySQL courses over on analyst builder.com I built a crash course for MySQL for people who are going to be interviewing or taking technical interviews I also created a full MySQL course that's going to cover everything from the basics all the way to the intermediate level and then lastly I created an advanced course that's going to teach you a lot of the more advanced things that an analyst would typically use those courses are going to go really in depth and they're going to have a lot of practice questions along the way and we'll also have full guided projects in there as well I'll have links in the description to to all of those courses if you want to check those out now without further Ado let's jump on my screen and install my SQL and create our database all right so let's get started by downloading MySQL we're going to come right over here to dev. myql.com /downloads slster and I will have that link in the description so you don't have to write all that out but you should be seeing this page right here now we have to select an operating system I'm using a Windows machine and if you aren't if you're using Linux or Mac or something else it should populate at 4 you but if it doesn't just select this drop down and select your operating system next we have two different downloads we can install the MySQL installer Community or MySQL installer web Community this one is very small but then you actually do have to download the installer it just gets it from the web this one I'm going to download the actual installer it's larger but this is the one I'm going to do so I'm going to go ahead and select download it's going to ask me if I want to log in or create an account and I don't I'm going to say no thanks just start my download I'm going to save this in this desktop folder doesn't really matter where you save it we're going to save that and it's going to download it should be done in just a few seconds I'm going to go ahead and click on it and it's going to open it up when it's finished and we should get the interface or the UI for the actual installation for MySQL so here is the MySQL installer and first thing we need to do is choose a setup type now we're going to keep the developer default unless you really know what you're doing and you can select the server only the client only full which is literally everything my SQL has to offer or custom so we're going to keep this developer default just installing the things that we kind of need so let's go ahead and select next and for whatever reason on my computer it's saying this path already exists you probably won't get that but I'm just going to go ahead and select next and then I'll select yes it keeps doing that I can't explain why but it keeps doing that for me even though I've deleted it from my computer completely U but it just remembers it somewhere in its memory now the next thing we need is to check requirements now I just have this one it says I need to download this uh Visual Studio I'm not going to do that but on your screen you may have multiple multiple requirements typically you're looking at something like this Microsoft Visual C++ redistributable package what you need to do is download this all you have to do is Click download once you download and install that on your computer and then we go back all of those should be gone that's the one that I see the most when I'm actually working with these requirements I had to install it myself when I got this new laptop so go ahead and install that if you need to but if yours looks like mine we don't need this visual studio for what we're going to do so we're going to go ahead and select next it is giving us a prompt that we haven't satisfied all the requirements but that's okay we're going to go ahead and select yes as well now we're ready to install all of these things these are all things that myl wants you to install the most important are the server and the workbench but it does not hurt to have all these other things as well some of these connectors are also important so we're going to go ahead and execute this will take just a few minutes I'll skip ahead uh when they're all done but this should take just a few minutes and then we'll continue on installing my SQL so everything just completed and now we're going to select next and now we need to actually configure our product now really the only one that we actually need to configure is the server the router says we need to configure it and the samples and examples say we need to configure it as well but really it's just the server let's go ahead and select next now we're not going to change anything for this type and networking unless you know what you're doing with the port the X protocol Port uh we're not going to change any of this we'll go ahead and select next next thing we need to do is Select an authentication method I'm going to be using a password I'm not going to be using the Legacy authentication method so I'm just going to go ahead and create a password now for you and I keep getting this error and I can't explain why right here for you you should be creating a password at the bottom it's remembering my password somehow and I I really can't explain it but I'm going to create my password or check my password uh this is one that I already created uh before I deleted it off my computer but it's still there um so it's saying my password is still good but if you need to you should be entering a password and then confirming your password and saving it and then you should also be checking it as well and then we're going to configure this as a MySQL server as a Windows service I'm going to keep that checked uh and we're going to start the MySQL server at system startup I like that automatically being there I don't want to mess with that so I'm going to keep it as it has it we're going to go ahead and select next and the last thing we do is just need to execute this and then everything we put in there is going to actually go so let's run this and execute it and that's just finished so let's go ahead and select finish now it says configuration complete for the server but we also need to configure these other two let's take a look at these really quickly we're not going to do anything on this it even says we really don't need to do this we just need to click finish and configuration not needed next we'll do samples and examples and we can input our password and all this is really going to do is put in some sample databases for us in our database which if you want you definitely can do that uh I just connected that worked I'm going to hit next and execute and it's basically just going to put in a database or two some sample ones for you to look at and the configuration is complete you don't have to do that one but we'll see that in just a second we're going to select next and now the installation is completely done and we can start my SQL workbench after setup and start my SQL shell after setup now I'm not going to do the shell so I'm going to actually uncheck that and we're going to select finish now my SQL just popped up for us and this is exactly what you should be seeing now there's a lot of things in my SQL to learn and know how to do we're not going to be taking a look at all of that stuff today but in future lessons we'll walk through a lot of these different things that kind of correlate with different lessons or things that we're working on in my SQL the first thing that we're going to click on is right over here this is our local instance this is local to just our machine it's not a connection to you know some other database on the cloud or anything like that it's just our local instance we're going to go ahead and click on this so this is what you should be seeing right here this is where we're going to actually write all of our SQL code and I'll show you all this in just a second but this is where we can actually create our database and our database is going to go right over here on this left hand side this silicon one is actually a sample database it has a bunch of tables and Views St procedures functions has all these things in in here if you want to go ahead and mess around with that what we're about to do is create our own database that we're going to be using throughout this entire series both the beginner intermediate and advanced we'll use a lot of this and sometimes we'll import some other ones for different use cases but this will serve for most of what we're trying to do throughout this entire series now what I'm going to do is I'm going to go ahead and I'm going to say open a SQL script file in a new query Tab and right here it opened up to a folder that I already created this MySQL beginner series folder within it we have this right here the parks and rec create DB now in order to get this you just have to go to the GitHub and download this file that's all you have to do we're then going to open this file so let's click on it we're going to say open and what you're now seeing is basically the query editor this is where you can write your code now we're not importing a database we're actually creating it by running code now because this is the first lesson in the beginner series I'm going to assume that you don't know a ton about my SQL really all this is doing is creating the database name and then we're inserting a few tables into that database and then we're inserting data into those tables so this is all of our data that will go into these tables that we create we only have one two three different tables that we're going to be using so all you have to do to run this is click this lightning button right up here we're going to go ahead and execute this if we come down to the bottom and we pull this up this is our output this says six rows affected and we have a bunch of other things like create table create table insert insert create table insert into these things are all working perfectly so now if we go ahead and click refresh in our schemas with this refresh button right here this Parks and Recreation table is populated if we go under the tables we see all of these things so now that we've actually created our database and our tables that's really all we were trying to do in this lesson but I just want to open up a table really quickly show you what it looks like show you how we can run code and then in the next lesson we'll start actually learning how to query this data so let's go up to employee demographics we're going to rightclick and select rows limit 1000 this is going to open up a new window right up here and it's going to say select everything from this database dot this table employee demographics and it ends with a semicolon now right down here we have this output window this is the actual data that sits in our table we have columns right here so employee ID first name last name age gender and birth date and then here are all of our employees on each row so these are all separate rows we have Leslie nope Tom haford and it goes on and on so this is all of our data the most important things to know when we're actually working with this and I'm going to zoom in is if we hover over this query right here and we run it we can select this execute which is this lightning bolt with this I we're going to execute this and it's going to run this because we're highlighted over it now if we have two queries let's say this one right here but let's change it to employee uncore salary so we'll do underscore salary let's say we want to query this table so now if we highlight over this and we go up and select the lightning bolt with the I now we're looking at a different table but if we select even if we're hovering over this if we select this button we're going to execute everything in this editor window so let's run this and now you can see at the bottom we have two outputs the employee demographics and the employee salary so this button is going to run everything in this editor window whereas if we select this lightning bolt with the ey we're doing everything that's just under where we have the cursor where we have it highlighted the very last thing that I want to mention is that right over here you may have this up and you probably don't want that we're not going to do any SQL additions in the series you can get rid of that by clicking this button right here so starting in the next lesson we'll have everything ready to go and we will start learning the basics of my sequel I hope you're able to follow along get everything set up how we have it on the screen I am super excited about this series I just I love SQL so I'm really really really excited to get started on this with you guys I will see you guys in the next [Music] lesson [Music]
Info
Channel: Alex The Analyst
Views: 155,353
Rating: undefined out of 5
Keywords: Data Analyst, Data Analyst job, Data Analyst Career, Data Analytics, Alex The Analyst
Id: wgRwITQHszU
Channel Id: undefined
Length: 12min 4sec (724 seconds)
Published: Tue Oct 31 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.