1
00:00:00,150 --> 00:00:00,540
All right.

2
00:00:00,540 --> 00:00:03,450
Let's talk about installing MySQL on Windows.

3
00:00:03,630 --> 00:00:06,000
It's a little bit different than doing it on a mac.

4
00:00:06,030 --> 00:00:11,340
Aside from the fact that there are different operating systems, it's actually a little easier on Windows

5
00:00:11,340 --> 00:00:12,030
for once.

6
00:00:12,450 --> 00:00:15,830
Sometimes it's it's the other way around with some of the technical tools.

7
00:00:15,840 --> 00:00:19,030
So there is a page on the documentation.

8
00:00:19,050 --> 00:00:22,950
I'll include a link attached to this video installing my SQL on Windows.

9
00:00:23,430 --> 00:00:28,680
They give you a couple of different options and the one that we're going to use is this installer method.

10
00:00:28,770 --> 00:00:32,009
So the first thing we have to do is download the installer.

11
00:00:32,890 --> 00:00:34,150
So there we are.

12
00:00:34,180 --> 00:00:35,920
And then we'll click download.

13
00:00:37,270 --> 00:00:38,770
We don't have to log in.

14
00:00:39,910 --> 00:00:41,290
We'll just start the download.

15
00:00:43,580 --> 00:00:44,900
We wait for that to finish.

16
00:00:46,270 --> 00:00:47,140
And.

17
00:00:47,140 --> 00:00:48,490
All right, let's open it up.

18
00:00:48,940 --> 00:00:52,840
Okay, so now we have a couple of different installation options.

19
00:00:53,170 --> 00:00:59,290
My SQL comes potentially comes with a lot of different tools, and we can select which of those tools

20
00:00:59,290 --> 00:01:01,320
we do want and don't want installed.

21
00:01:01,330 --> 00:01:03,940
And normally I would say just do the developer default.

22
00:01:03,970 --> 00:01:10,870
However, if you do that, it is going to try and install a plug in for a piece of software called Visual

23
00:01:10,870 --> 00:01:12,890
Studio, which you may or may not have.

24
00:01:12,910 --> 00:01:17,500
You don't need it for this course and it happens to be like a two gigabyte download.

25
00:01:17,500 --> 00:01:20,140
So one option is just to do the default.

26
00:01:20,140 --> 00:01:21,210
You'll get everything you need.

27
00:01:21,220 --> 00:01:27,940
But what I'm going to do is make a custom install and then it might be hard for you to see here, but

28
00:01:27,940 --> 00:01:34,690
I'm going to select my SQL for Visual Studio and boot it off by clicking that left arrow because I don't

29
00:01:34,690 --> 00:01:35,440
want that.

30
00:01:35,830 --> 00:01:38,140
We'll keep the documentation, the connectors.

31
00:01:38,140 --> 00:01:39,400
Those are fine.

32
00:01:40,090 --> 00:01:43,150
We want the shell, we want the workbench and the server.

33
00:01:43,150 --> 00:01:44,680
So I'll click next.

34
00:01:45,280 --> 00:01:47,350
It says Ready to download for all of these.

35
00:01:47,350 --> 00:01:50,400
You may have some requirements that have to be installed as well.

36
00:01:50,410 --> 00:01:54,820
You might see a screen that says install these requirements and it can do it automatically.

37
00:01:55,540 --> 00:02:00,190
So I'm going to click Execute and I'll fast forward to one of this when this finishes up.

38
00:02:00,190 --> 00:02:01,330
It shouldn't take too long.

39
00:02:01,970 --> 00:02:03,670
Okay, that took a couple of minutes.

40
00:02:03,670 --> 00:02:05,290
Then I'll click next.

41
00:02:06,330 --> 00:02:10,169
And then I'm going to click Execute because that was just to download the packages.

42
00:02:10,199 --> 00:02:15,150
Now it's installing everything and this should be a little bit faster, but it still might be a couple

43
00:02:15,150 --> 00:02:18,270
of minutes and now it's time to configure things.

44
00:02:18,270 --> 00:02:20,040
So this is pretty important here.

45
00:02:20,460 --> 00:02:22,860
We're going to just keep this as it is.

46
00:02:22,860 --> 00:02:23,880
Type in networking.

47
00:02:23,880 --> 00:02:26,460
This is for the server, my SQL server.

48
00:02:26,880 --> 00:02:28,200
Just leave it alone here.

49
00:02:28,560 --> 00:02:29,520
Click next.

50
00:02:29,520 --> 00:02:30,960
This is the part that's important.

51
00:02:30,960 --> 00:02:36,870
Leave this checked where it says recommended and then we need to put in a root password.

52
00:02:36,870 --> 00:02:42,030
So the root user in my SQL is the highest level user.

53
00:02:42,570 --> 00:02:47,340
It's what we are going to log in as when we start my SQL up.

54
00:02:47,340 --> 00:02:48,930
So you want to come up with the password.

55
00:02:48,930 --> 00:02:53,700
You'll remember you can change this later, but it's very important that whatever you put in here,

56
00:02:53,700 --> 00:02:54,660
you remember.

57
00:02:54,990 --> 00:02:57,300
So I'll do some password in here.

58
00:02:59,490 --> 00:03:01,350
I'm not telling you.

59
00:03:02,580 --> 00:03:04,710
Okay, now only medium well.

60
00:03:04,710 --> 00:03:07,170
I've got to type it with a mic in front of my face while talking.

61
00:03:07,170 --> 00:03:08,280
So sorry.

62
00:03:08,280 --> 00:03:12,630
I'm keeping it medium and then I'm just going to keep it at that.

63
00:03:12,630 --> 00:03:14,040
You could add some users here.

64
00:03:14,040 --> 00:03:17,160
We're not going to worry about that for now because it's so overwhelming to install this.

65
00:03:17,160 --> 00:03:17,730
Anyway.

66
00:03:17,730 --> 00:03:20,400
We just want to get writing some SQL as soon as possible.

67
00:03:20,400 --> 00:03:22,110
So then I'm going to click next.

68
00:03:22,800 --> 00:03:28,140
And then here there's a couple of options that I want to configure my SQL Server as a Windows Service.

69
00:03:28,380 --> 00:03:29,940
Sure, we can do that.

70
00:03:30,210 --> 00:03:35,670
I'll leave the default name my SQL eight start at the system startup.

71
00:03:35,670 --> 00:03:36,450
Sure.

72
00:03:36,450 --> 00:03:44,220
And I'm going to click next again, click next again, and then we are going to click Execute.

73
00:03:44,550 --> 00:03:48,540
Okay, It says We finished configuring the server, We'll click finish.

74
00:03:49,020 --> 00:03:50,790
There's a little bit more configuration here.

75
00:03:50,790 --> 00:03:57,810
I'm just going to click Finish next, and then here it's going to ask me to put in my username route.

76
00:03:57,810 --> 00:04:01,470
I'm going to leave that and put in the password that we just came up with.

77
00:04:01,500 --> 00:04:05,070
This is just to get the examples and samples up and running.

78
00:04:05,100 --> 00:04:09,690
This is actually not required to use my SQL, but I'm going to put the password in there that I just

79
00:04:09,690 --> 00:04:10,290
set up.

80
00:04:10,890 --> 00:04:12,390
We'll check it and get a check Mark.

81
00:04:12,390 --> 00:04:13,080
That's good.

82
00:04:13,080 --> 00:04:17,220
Click next and we'll click Execute and that should be it.

83
00:04:17,220 --> 00:04:19,769
For configuration, we'll click finish.

84
00:04:20,279 --> 00:04:21,000
Nope.

85
00:04:21,029 --> 00:04:21,990
What am I missing now?

86
00:04:21,990 --> 00:04:25,410
There's still more configuration installation complete.

87
00:04:25,950 --> 00:04:30,270
All right, so now we have two checkboxes that are enabled by default.

88
00:04:30,270 --> 00:04:36,930
I'm going to leave them checked, start my SQL workbench, start the shell after I close out of here.

89
00:04:36,930 --> 00:04:42,180
All right, So now what I want to show you is how to actually get the command line client up and running.

90
00:04:42,180 --> 00:04:48,690
It's very easy now that we went through that somewhat painful install will go to our little whatever

91
00:04:48,690 --> 00:04:52,860
you call this navigator search down here and you can search for my SQL.

92
00:04:53,130 --> 00:04:56,340
And what I want is the command line client.

93
00:04:57,130 --> 00:04:59,200
So we're going to ask you to enter my password.

94
00:05:01,720 --> 00:05:03,220
And that's the root password.

95
00:05:03,220 --> 00:05:04,650
And now I'm in.

96
00:05:04,660 --> 00:05:10,510
I have the command line access that I showed you the equivalent on my Mac right now here, I'm on my

97
00:05:10,510 --> 00:05:11,260
Mac.

98
00:05:11,770 --> 00:05:14,200
It doesn't look very Mac, but this is my Mac.

99
00:05:14,200 --> 00:05:15,790
I'm just have a terminal window open.

100
00:05:15,790 --> 00:05:19,510
And I want you to see when I run this command.

101
00:05:22,270 --> 00:05:23,500
And type my password.

102
00:05:23,740 --> 00:05:29,590
I see the same prompt, so you don't have to do that for fortunately, all you have to do is go down

103
00:05:29,590 --> 00:05:33,880
here, go to command line client and it opens it up for you.

104
00:05:33,910 --> 00:05:36,460
You can type your password and now we can run some.

105
00:05:36,460 --> 00:05:38,710
My SQL commands a very simple one.

106
00:05:38,710 --> 00:05:39,220
How about this?

107
00:05:39,220 --> 00:05:45,010
Select one plus one and a semicolon and it tells me the answer is two.

108
00:05:45,040 --> 00:05:50,410
We're using my SQL as a calculator, so we're not going to learn anything else in terms of syntax,

109
00:05:50,410 --> 00:05:52,570
except I guess I'll show you how to quit out of here.

110
00:05:52,570 --> 00:05:57,670
You could just X out, but if you do quit and hit enter, is it letting me type?

111
00:05:57,880 --> 00:05:58,570
There we go.

112
00:05:58,570 --> 00:05:59,770
The whole thing goes away.

113
00:06:00,520 --> 00:06:02,470
Now moving on to the workbench.

114
00:06:02,470 --> 00:06:05,560
This is where I suspect a lot of you will prefer to write your code.

115
00:06:05,860 --> 00:06:08,500
You'll see that it has this connection already set up.

116
00:06:08,500 --> 00:06:11,410
It knows about my local instance of my SQL.

117
00:06:11,440 --> 00:06:16,090
I could theoretically, you could have multiple connections, but for this course you really just need

118
00:06:16,090 --> 00:06:16,960
that default one.

119
00:06:16,960 --> 00:06:19,420
So you'll click that, you'll have to type the password.

120
00:06:19,420 --> 00:06:23,500
You can ask it to save the password if you want, click okay.

121
00:06:24,010 --> 00:06:27,880
And this is then going to connect to our my SQL Server.

122
00:06:27,880 --> 00:06:34,030
So this allows me I'm going to shrink this down here and shrink most of this down.

123
00:06:34,150 --> 00:06:36,490
This is where I can type my SQL code.

124
00:06:36,970 --> 00:06:39,040
I can't make the font bigger very easily.

125
00:06:39,040 --> 00:06:42,340
I can magnify a guess, but the font itself won't get much bigger.

126
00:06:42,340 --> 00:06:47,110
But if I do the same thing I just showed you, select one plus one.

127
00:06:47,110 --> 00:06:49,060
Oh, I type select twice somehow.

128
00:06:49,690 --> 00:06:54,460
Again, don't worry about the syntax, just try typing it and click this lightning bolt.

129
00:06:55,270 --> 00:06:58,180
And right here we have our results.

130
00:06:58,180 --> 00:07:01,630
So the same answer of course, we would expect to get to.

131
00:07:01,990 --> 00:07:07,150
But as I showed you a couple of videos ago, whether you type it directly in the command line or you

132
00:07:07,150 --> 00:07:11,980
type your code through an editor like the SQL Workbench, you'll get the same result.

133
00:07:11,980 --> 00:07:15,880
So this is nice because it allows you to type a bunch of stuff, right?

134
00:07:15,880 --> 00:07:17,560
Have a bunch of files going.

135
00:07:17,740 --> 00:07:23,020
If I click this right here, this icon will make me a new SQL file.

136
00:07:23,050 --> 00:07:24,370
You can save them.

137
00:07:24,370 --> 00:07:25,300
There's a lot to it.

138
00:07:25,300 --> 00:07:27,820
So you can do file save, you can use a shortcut.

139
00:07:28,750 --> 00:07:31,120
And that's kind of all you need to know for now.

140
00:07:31,120 --> 00:07:34,330
So you'll type a query or whatever your SQL is.

141
00:07:34,540 --> 00:07:36,370
Let's do two of them so you can see the difference.

142
00:07:36,370 --> 00:07:39,220
Let's select eight times nine.

143
00:07:39,220 --> 00:07:40,150
So a star.

144
00:07:40,150 --> 00:07:41,680
And then I need a semicolon.

145
00:07:41,680 --> 00:07:43,660
That semicolon very is very important.

146
00:07:43,870 --> 00:07:45,220
So I have two things in here.

147
00:07:45,220 --> 00:07:50,890
If I click the lightning bolt, it runs the entire script and that means it runs this.

148
00:07:50,890 --> 00:07:54,370
First we get a result which you won't see right away.

149
00:07:54,910 --> 00:07:55,960
It's over here.

150
00:07:56,590 --> 00:08:01,450
I have results, this first result, and then I have a second result for this query.

151
00:08:01,720 --> 00:08:05,320
Or alternatively, if I shut both of those down.

152
00:08:06,080 --> 00:08:08,480
What I can do is use this lightning bolt here.

153
00:08:08,480 --> 00:08:13,820
The second one that will only run whatever query my cursor currently has selected.

154
00:08:13,820 --> 00:08:15,440
So let's select this one.

155
00:08:15,440 --> 00:08:18,650
I click this lightning bolt and I only see two is my answer.

156
00:08:18,650 --> 00:08:20,060
One plus one is two.

157
00:08:20,420 --> 00:08:22,040
So it didn't run both of them.

158
00:08:22,040 --> 00:08:24,380
But that's really all you need to know to get through this course.

159
00:08:24,380 --> 00:08:30,470
Type your query, save the file so you have it and then click the lightning bolt to run everything in

160
00:08:30,470 --> 00:08:35,210
your file or click this other lightning bolt to only run whatever your cursor has selected.

161
00:08:35,330 --> 00:08:42,350
And then remember, if you want to go to the command line, open it up by searching for command line

162
00:08:42,350 --> 00:08:45,500
client, type your route password that you configured.

163
00:08:46,460 --> 00:08:47,960
And now I can do the same thing.

164
00:08:47,960 --> 00:08:52,040
Select one plus one and we see two.

165
00:08:52,640 --> 00:08:54,650
All right, so that's it.

166
00:08:54,650 --> 00:08:55,520
We are installed.

167
00:08:55,520 --> 00:08:59,660
It looks a little bit different, of course, than what you'll see me using on my Mac in the course.

168
00:08:59,660 --> 00:09:01,610
But it's really, really similar.

169
00:09:01,910 --> 00:09:06,710
The installation process is a bit different, but now that we have workbench installed, we have the

170
00:09:06,710 --> 00:09:08,900
server, we have the command line client.

171
00:09:08,900 --> 00:09:09,890
We are good to go.

172
00:09:09,890 --> 00:09:11,120
I hope you're still with me.

173
00:09:11,120 --> 00:09:12,530
Still live for the pulse.

174
00:09:12,530 --> 00:09:13,520
I know it's a lot.

