All right.
Let's talk about installing MySQL on Windows.
It's a little bit different than doing it on a mac.
Aside from the fact that there are different operating systems, it's actually a little easier on Windows
for once.
Sometimes it's it's the other way around with some of the technical tools.
So there is a page on the documentation.
I'll include a link attached to this video installing my SQL on Windows.
They give you a couple of different options and the one that we're going to use is this installer method.
So the first thing we have to do is download the installer.
So there we are.
And then we'll click download.
We don't have to log in.
We'll just start the download.
We wait for that to finish.
And.
All right, let's open it up.
Okay, so now we have a couple of different installation options.
My SQL comes potentially comes with a lot of different tools, and we can select which of those tools
we do want and don't want installed.
And normally I would say just do the developer default.
However, if you do that, it is going to try and install a plug in for a piece of software called Visual
Studio, which you may or may not have.
You don't need it for this course and it happens to be like a two gigabyte download.
So one option is just to do the default.
You'll get everything you need.
But what I'm going to do is make a custom install and then it might be hard for you to see here, but
I'm going to select my SQL for Visual Studio and boot it off by clicking that left arrow because I don't
want that.
We'll keep the documentation, the connectors.
Those are fine.
We want the shell, we want the workbench and the server.
So I'll click next.
It says Ready to download for all of these.
You may have some requirements that have to be installed as well.
You might see a screen that says install these requirements and it can do it automatically.
So I'm going to click Execute and I'll fast forward to one of this when this finishes up.
It shouldn't take too long.
Okay, that took a couple of minutes.
Then I'll click next.
And then I'm going to click Execute because that was just to download the packages.
Now it's installing everything and this should be a little bit faster, but it still might be a couple
of minutes and now it's time to configure things.
So this is pretty important here.
We're going to just keep this as it is.
Type in networking.
This is for the server, my SQL server.
Just leave it alone here.
Click next.
This is the part that's important.
Leave this checked where it says recommended and then we need to put in a root password.
So the root user in my SQL is the highest level user.
It's what we are going to log in as when we start my SQL up.
So you want to come up with the password.
You'll remember you can change this later, but it's very important that whatever you put in here,
you remember.
So I'll do some password in here.
I'm not telling you.
Okay, now only medium well.
I've got to type it with a mic in front of my face while talking.
So sorry.
I'm keeping it medium and then I'm just going to keep it at that.
You could add some users here.
We're not going to worry about that for now because it's so overwhelming to install this.
Anyway.
We just want to get writing some SQL as soon as possible.
So then I'm going to click next.
And then here there's a couple of options that I want to configure my SQL Server as a Windows Service.
Sure, we can do that.
I'll leave the default name my SQL eight start at the system startup.
Sure.
And I'm going to click next again, click next again, and then we are going to click Execute.
Okay, It says We finished configuring the server, We'll click finish.
There's a little bit more configuration here.
I'm just going to click Finish next, and then here it's going to ask me to put in my username route.
I'm going to leave that and put in the password that we just came up with.
This is just to get the examples and samples up and running.
This is actually not required to use my SQL, but I'm going to put the password in there that I just
set up.
We'll check it and get a check Mark.
That's good.
Click next and we'll click Execute and that should be it.
For configuration, we'll click finish.
Nope.
What am I missing now?
There's still more configuration installation complete.
All right, so now we have two checkboxes that are enabled by default.
I'm going to leave them checked, start my SQL workbench, start the shell after I close out of here.
All right, So now what I want to show you is how to actually get the command line client up and running.
It's very easy now that we went through that somewhat painful install will go to our little whatever
you call this navigator search down here and you can search for my SQL.
And what I want is the command line client.
So we're going to ask you to enter my password.
And that's the root password.
And now I'm in.
I have the command line access that I showed you the equivalent on my Mac right now here, I'm on my
Mac.
It doesn't look very Mac, but this is my Mac.
I'm just have a terminal window open.
And I want you to see when I run this command.
And type my password.
I see the same prompt, so you don't have to do that for fortunately, all you have to do is go down
here, go to command line client and it opens it up for you.
You can type your password and now we can run some.
My SQL commands a very simple one.
How about this?
Select one plus one and a semicolon and it tells me the answer is two.
We're using my SQL as a calculator, so we're not going to learn anything else in terms of syntax,
except I guess I'll show you how to quit out of here.
You could just X out, but if you do quit and hit enter, is it letting me type?
There we go.
The whole thing goes away.
Now moving on to the workbench.
This is where I suspect a lot of you will prefer to write your code.
You'll see that it has this connection already set up.
It knows about my local instance of my SQL.
I could theoretically, you could have multiple connections, but for this course you really just need
that default one.
So you'll click that, you'll have to type the password.
You can ask it to save the password if you want, click okay.
And this is then going to connect to our my SQL Server.
So this allows me I'm going to shrink this down here and shrink most of this down.
This is where I can type my SQL code.
I can't make the font bigger very easily.
I can magnify a guess, but the font itself won't get much bigger.
But if I do the same thing I just showed you, select one plus one.
Oh, I type select twice somehow.
Again, don't worry about the syntax, just try typing it and click this lightning bolt.
And right here we have our results.
So the same answer of course, we would expect to get to.
But as I showed you a couple of videos ago, whether you type it directly in the command line or you
type your code through an editor like the SQL Workbench, you'll get the same result.
So this is nice because it allows you to type a bunch of stuff, right?
Have a bunch of files going.
If I click this right here, this icon will make me a new SQL file.
You can save them.
There's a lot to it.
So you can do file save, you can use a shortcut.
And that's kind of all you need to know for now.
So you'll type a query or whatever your SQL is.
Let's do two of them so you can see the difference.
Let's select eight times nine.
So a star.
And then I need a semicolon.
That semicolon very is very important.
So I have two things in here.
If I click the lightning bolt, it runs the entire script and that means it runs this.
First we get a result which you won't see right away.
It's over here.
I have results, this first result, and then I have a second result for this query.
Or alternatively, if I shut both of those down.
What I can do is use this lightning bolt here.
The second one that will only run whatever query my cursor currently has selected.
So let's select this one.
I click this lightning bolt and I only see two is my answer.
One plus one is two.
So it didn't run both of them.
But that's really all you need to know to get through this course.
Type your query, save the file so you have it and then click the lightning bolt to run everything in
your file or click this other lightning bolt to only run whatever your cursor has selected.
And then remember, if you want to go to the command line, open it up by searching for command line
client, type your route password that you configured.
And now I can do the same thing.
Select one plus one and we see two.
All right, so that's it.
We are installed.
It looks a little bit different, of course, than what you'll see me using on my Mac in the course.
But it's really, really similar.
The installation process is a bit different, but now that we have workbench installed, we have the
server, we have the command line client.
We are good to go.
I hope you're still with me.
Still live for the pulse.
I know it's a lot.