1
00:00:02,050 --> 00:00:02,883
Now you can,

2
00:00:02,883 --> 00:00:06,680
of course install MySQL this database system

3
00:00:06,680 --> 00:00:08,920
on all operating systems.

4
00:00:08,920 --> 00:00:12,770
On windows, on macOS and on Linux.

5
00:00:12,770 --> 00:00:14,430
Now here, I'll start on a Mac

6
00:00:14,430 --> 00:00:17,330
but I'll also show you the windows set up process

7
00:00:17,330 --> 00:00:19,040
in this same lecture here.

8
00:00:19,920 --> 00:00:21,800
Now for the macOS setup,

9
00:00:21,800 --> 00:00:25,410
you can just search for MySQL macOS

10
00:00:25,410 --> 00:00:29,640
and you should find this download MySQL community server

11
00:00:29,640 --> 00:00:32,200
option here which you can click,

12
00:00:32,200 --> 00:00:35,170
and that should take you to this page here,

13
00:00:35,170 --> 00:00:37,440
there you can actually also choose

14
00:00:37,440 --> 00:00:39,140
different operating systems

15
00:00:39,140 --> 00:00:41,010
but I'm going to go with macOS

16
00:00:41,010 --> 00:00:42,740
but if you're following along on windows,

17
00:00:42,740 --> 00:00:46,660
you can also choose a windows already if you want to,

18
00:00:46,660 --> 00:00:49,803
and on macOS here we now got various options,

19
00:00:50,770 --> 00:00:54,170
on windows we also got various options by the way.

20
00:00:54,170 --> 00:00:57,680
And the difference between these options simply is

21
00:00:57,680 --> 00:01:00,040
what's included or not.

22
00:01:00,040 --> 00:01:02,990
On macOS here, we got four options

23
00:01:02,990 --> 00:01:06,400
and actually it's the first option which we want here

24
00:01:06,400 --> 00:01:10,880
because that will be this well executable file

25
00:01:10,880 --> 00:01:11,880
which we get,

26
00:01:11,880 --> 00:01:13,490
which has 400 megabytes

27
00:01:13,490 --> 00:01:15,710
because it's actually already includes

28
00:01:15,710 --> 00:01:20,710
all the MySQL related elements that we could need,

29
00:01:20,940 --> 00:01:24,230
that is the database server itself

30
00:01:24,230 --> 00:01:27,100
so to thing that we'll host our databases

31
00:01:27,100 --> 00:01:30,400
but then also tools for connecting to the database

32
00:01:30,400 --> 00:01:32,163
and for playing around with it.

33
00:01:33,310 --> 00:01:35,460
Now on the windows we only got two options,

34
00:01:35,460 --> 00:01:37,620
at least at the point of time and recording this

35
00:01:37,620 --> 00:01:39,780
and we got a very small option

36
00:01:39,780 --> 00:01:42,060
where we don't have to download much

37
00:01:42,060 --> 00:01:44,210
and then a larger option.

38
00:01:44,210 --> 00:01:47,220
Now here, the difference is that with the small option,

39
00:01:47,220 --> 00:01:49,250
which is the one I recommend using,

40
00:01:49,250 --> 00:01:52,520
you will get a very slim installer

41
00:01:52,520 --> 00:01:54,370
and during the installation

42
00:01:54,370 --> 00:01:56,850
you can choose what you wanna install,

43
00:01:56,850 --> 00:01:59,930
and then you will only download these pieces,

44
00:01:59,930 --> 00:02:03,320
which is a bit more efficient than downloading everything

45
00:02:03,320 --> 00:02:06,260
and then only using some parts of it.

46
00:02:06,260 --> 00:02:08,680
So therefore on windows I'll choose the smaller option

47
00:02:08,680 --> 00:02:09,963
and download that,

48
00:02:11,240 --> 00:02:14,790
on macOS I will choose this first option here,

49
00:02:14,790 --> 00:02:16,853
which is this DMG archive.

50
00:02:18,090 --> 00:02:21,290
Now, either way if you click on the download button here,

51
00:02:21,290 --> 00:02:23,420
you will be taken to this page

52
00:02:23,420 --> 00:02:25,720
and it might look like you have to sign up there,

53
00:02:25,720 --> 00:02:29,050
but actually you can continue without signing up

54
00:02:29,050 --> 00:02:30,950
and just start to download,

55
00:02:30,950 --> 00:02:33,050
which is what I do here.

56
00:02:33,050 --> 00:02:35,930
And now we'll just wait for that to download to finish,

57
00:02:35,930 --> 00:02:36,870
on windows, of course

58
00:02:36,870 --> 00:02:39,540
it's will be very quick because it's much smaller

59
00:02:39,540 --> 00:02:41,713
on macOS it will take a short while.

60
00:02:43,100 --> 00:02:46,860
Now the downloads finished on both systems now for me

61
00:02:46,860 --> 00:02:48,890
and I'll again start with macOS

62
00:02:48,890 --> 00:02:52,130
and show you the windows steps in a couple of seconds,

63
00:02:52,130 --> 00:02:56,620
and on macOS I will execute this downloaded file here,

64
00:02:56,620 --> 00:02:59,540
and that will give me such a executable inside

65
00:02:59,540 --> 00:03:02,470
which is the downloader I can execute,

66
00:03:02,470 --> 00:03:04,193
I'll allow access here.

67
00:03:07,180 --> 00:03:08,013
And now here,

68
00:03:08,013 --> 00:03:12,153
I got the installer for the MySQL tools on macOS,

69
00:03:13,290 --> 00:03:15,730
so here on macOS I will click continue,

70
00:03:15,730 --> 00:03:18,130
accept the license here, continue

71
00:03:18,980 --> 00:03:20,933
and then click install here,

72
00:03:22,970 --> 00:03:25,390
enter my password when being prompted for it,

73
00:03:25,390 --> 00:03:29,000
and now this will install me all these SQL tools

74
00:03:29,000 --> 00:03:31,010
onto my Mac.

75
00:03:31,010 --> 00:03:33,260
Now let's wait for that to finish here,

76
00:03:33,260 --> 00:03:34,240
and in the meantime,

77
00:03:34,240 --> 00:03:36,433
let's see how that would work on windows,

78
00:03:37,320 --> 00:03:40,250
on windows we also can start this installer,

79
00:03:40,250 --> 00:03:42,880
and as I said here, I downloaded the installer,

80
00:03:42,880 --> 00:03:44,830
which doesn't include anything,

81
00:03:44,830 --> 00:03:47,700
but where we instead have to pick what we wanna install,

82
00:03:47,700 --> 00:03:51,840
and here we now definitely wanna pick MySQL server,

83
00:03:51,840 --> 00:03:56,320
which is the thing that will actually host our databases,

84
00:03:56,320 --> 00:03:58,350
and use the latest version here,

85
00:03:58,350 --> 00:04:00,910
and you can use the latest version you have here

86
00:04:00,910 --> 00:04:03,750
at the point of time you are viewing this.

87
00:04:03,750 --> 00:04:06,593
What I teach you will apply to that version as well.

88
00:04:07,440 --> 00:04:09,110
So you'll pick that version

89
00:04:09,110 --> 00:04:11,990
and add it by clicking on this arrow.

90
00:04:11,990 --> 00:04:15,300
And then we also wanna install another tool,

91
00:04:15,300 --> 00:04:18,899
which is called the MySQL workbench.

92
00:04:18,899 --> 00:04:21,350
This is a graphical user interface,

93
00:04:21,350 --> 00:04:25,720
which we will be able to use to interact with that database

94
00:04:25,720 --> 00:04:29,620
and that's a great tool for administrating the database,

95
00:04:29,620 --> 00:04:31,990
but also for playing around with it

96
00:04:31,990 --> 00:04:33,560
and run queries against it

97
00:04:33,560 --> 00:04:36,600
in a nice graphical user interface.

98
00:04:36,600 --> 00:04:38,840
So for learning how to use SQL,

99
00:04:38,840 --> 00:04:40,770
we definitely wanna install that

100
00:04:40,770 --> 00:04:42,880
and hence, I also pick this tool

101
00:04:42,880 --> 00:04:45,100
and add it by clicking the arrow,

102
00:04:45,100 --> 00:04:47,603
and then we can continue here.

103
00:04:49,100 --> 00:04:51,360
Now, these tools will be downloaded,

104
00:04:51,360 --> 00:04:53,210
and then once they were downloaded

105
00:04:53,210 --> 00:04:54,603
they will be installed.

106
00:04:58,210 --> 00:05:01,430
Now, on macOS I already downloaded everything

107
00:05:01,430 --> 00:05:03,730
and everything was installed,

108
00:05:03,730 --> 00:05:05,410
and therefore, now here

109
00:05:05,410 --> 00:05:08,230
we now actually continue with the configuration

110
00:05:08,230 --> 00:05:10,850
of the installed software.

111
00:05:10,850 --> 00:05:12,030
Now, here on windows,

112
00:05:12,030 --> 00:05:13,210
we actually, first of all

113
00:05:13,210 --> 00:05:15,960
have to choose our configuration type

114
00:05:15,960 --> 00:05:18,230
and we can keep all the defaults here,

115
00:05:18,230 --> 00:05:20,010
nothing we have to change here

116
00:05:20,010 --> 00:05:22,870
on macOS I'm not prompted to choose anything there,

117
00:05:22,870 --> 00:05:24,510
but since we kept the defaults,

118
00:05:24,510 --> 00:05:26,910
that will be fine here as well.

119
00:05:26,910 --> 00:05:28,200
And then as a next step,

120
00:05:28,200 --> 00:05:32,260
we have to choose our password encryption method

121
00:05:32,260 --> 00:05:34,840
and we can use the strong one here,

122
00:05:34,840 --> 00:05:38,083
so we can choose that and click next.

123
00:05:43,840 --> 00:05:45,500
And then as a next step,

124
00:05:45,500 --> 00:05:49,600
we have to set a password for our route user,

125
00:05:49,600 --> 00:05:52,413
both on windows and on macOS.

126
00:05:53,430 --> 00:05:57,180
And then choose a password which we will use for connecting

127
00:05:57,180 --> 00:05:58,370
to the database.

128
00:05:58,370 --> 00:06:00,213
And for this it's important to understand

129
00:06:00,213 --> 00:06:02,350
that what we set up here

130
00:06:02,350 --> 00:06:05,220
is actually a server for our databases,

131
00:06:05,220 --> 00:06:07,520
a SQL server for our databases

132
00:06:07,520 --> 00:06:10,620
that will run on our local machine,

133
00:06:10,620 --> 00:06:13,400
just as we ran the web development server

134
00:06:13,400 --> 00:06:15,890
locally on our machine for development

135
00:06:15,890 --> 00:06:18,450
over the last cors sections,

136
00:06:18,450 --> 00:06:20,870
therefore this server will also run locally

137
00:06:20,870 --> 00:06:22,240
on our local machine,

138
00:06:22,240 --> 00:06:25,130
and we will be able to connect to the server

139
00:06:25,130 --> 00:06:27,300
to then interact with the databases

140
00:06:27,300 --> 00:06:28,913
and the data stored in there.

141
00:06:30,300 --> 00:06:33,320
And therefore we need to set up credentials

142
00:06:33,320 --> 00:06:36,640
that can be used by us by our web application,

143
00:06:36,640 --> 00:06:38,470
by our website for example,

144
00:06:38,470 --> 00:06:41,750
to connect to debt database server.

145
00:06:41,750 --> 00:06:44,080
So it's a server, just not serving a website

146
00:06:44,080 --> 00:06:45,200
but databases

147
00:06:45,200 --> 00:06:48,530
and we need to be able to establish a connection.

148
00:06:48,530 --> 00:06:52,510
For our web server no credentials were required

149
00:06:52,510 --> 00:06:55,390
because everyone should be able to send requests

150
00:06:55,390 --> 00:06:56,880
to our web server,

151
00:06:56,880 --> 00:06:59,690
but for the database server that should not be the case,

152
00:06:59,690 --> 00:07:02,820
not everyone should be able to connect to it

153
00:07:02,820 --> 00:07:06,620
instead, we want to control who can connect.

154
00:07:06,620 --> 00:07:09,160
And therefore we have that user,

155
00:07:09,160 --> 00:07:11,340
we have that default the route user,

156
00:07:11,340 --> 00:07:15,040
and we can now set up a password that will be required

157
00:07:15,040 --> 00:07:19,120
when you want to connect to that database server.

158
00:07:19,120 --> 00:07:22,340
And you can set that password on your own here

159
00:07:22,340 --> 00:07:24,543
and on windows also confirm it.

160
00:07:28,280 --> 00:07:32,010
And then with that on macOS I'm done,

161
00:07:32,010 --> 00:07:34,380
and I'll finish this in a second.

162
00:07:34,380 --> 00:07:36,690
On windows I'm not done yet,

163
00:07:36,690 --> 00:07:38,380
instead in the next step

164
00:07:38,380 --> 00:07:41,640
I'm asked whether I wanna start MySQL server

165
00:07:41,640 --> 00:07:43,360
as a windows service,

166
00:07:43,360 --> 00:07:46,420
and I will actually keep this checked

167
00:07:46,420 --> 00:07:48,950
but I will disable this checkbox

168
00:07:48,950 --> 00:07:52,493
that it should always be started when my system starts up.

169
00:07:53,790 --> 00:07:57,090
I don't want to always start the database server

170
00:07:57,090 --> 00:08:00,440
just because I rebooted my system.

171
00:08:00,440 --> 00:08:01,980
Instead in a couple of seconds,

172
00:08:01,980 --> 00:08:04,580
I will show you how you can manually start

173
00:08:04,580 --> 00:08:07,650
and stop this SQL server service

174
00:08:07,650 --> 00:08:10,430
and that's the approach I will use here.

175
00:08:10,430 --> 00:08:12,580
So therefore here I'll disabled this,

176
00:08:12,580 --> 00:08:16,403
but keep the first checkbox checked and then continue.

177
00:08:19,610 --> 00:08:21,250
And with that, I'm done there as well

178
00:08:21,250 --> 00:08:22,450
and we can click next,

179
00:08:22,450 --> 00:08:25,480
and now all these setup and configuration steps

180
00:08:25,480 --> 00:08:26,850
will be performed,

181
00:08:26,850 --> 00:08:29,653
and here on macOS I will now also click finish.

182
00:08:31,210 --> 00:08:32,750
Confirmed as with my password

183
00:08:32,750 --> 00:08:35,059
and now all the initial database setup

184
00:08:35,059 --> 00:08:38,159
will be performed there as well.

185
00:08:38,159 --> 00:08:39,549
So now I'm done here,

186
00:08:39,549 --> 00:08:41,260
on windows I'm also done

187
00:08:41,260 --> 00:08:43,263
and I'll also close this on macOS.

188
00:08:44,870 --> 00:08:49,100
Now, on macOS the SQL database server already started

189
00:08:49,100 --> 00:08:53,410
because I had this checkbox before I finished the set up,

190
00:08:53,410 --> 00:08:56,610
but on macOS to now control this server

191
00:08:56,610 --> 00:08:58,310
and start or stop it,

192
00:08:58,310 --> 00:09:01,107
you can now open your system preferences,

193
00:09:01,107 --> 00:09:04,500
and there you'll have this MySQL option

194
00:09:04,500 --> 00:09:08,960
where you can actually stop this MySQL server

195
00:09:08,960 --> 00:09:10,150
and then restarted it

196
00:09:10,150 --> 00:09:12,720
and you can also check whether should always start

197
00:09:12,720 --> 00:09:14,180
when your computer starts,

198
00:09:14,180 --> 00:09:16,210
and I'll disable this for example,

199
00:09:16,210 --> 00:09:19,070
I don't always want to start the database,

200
00:09:19,070 --> 00:09:22,403
and I can stop the server here if I want to.

201
00:09:23,800 --> 00:09:26,300
And I can start the server here

202
00:09:26,300 --> 00:09:28,070
if I then want to work on it again,

203
00:09:28,070 --> 00:09:29,140
and it will start it now

204
00:09:29,140 --> 00:09:31,193
because we will work with it in a second.

205
00:09:32,150 --> 00:09:33,850
We can also configure it here,

206
00:09:33,850 --> 00:09:36,983
but the default configuration should typically be fine.

207
00:09:38,460 --> 00:09:43,090
Now on windows, I now did set it up as a service

208
00:09:43,090 --> 00:09:46,330
and it was automatically started as a default,

209
00:09:46,330 --> 00:09:49,190
if you want to stop or started manually,

210
00:09:49,190 --> 00:09:51,220
you can open your command menu

211
00:09:51,220 --> 00:09:53,540
and just search for services there

212
00:09:53,540 --> 00:09:56,590
to find this services menu,

213
00:09:56,590 --> 00:09:58,900
and then in this services menu

214
00:09:58,900 --> 00:10:01,270
you can scroll down to M

215
00:10:01,270 --> 00:10:04,750
and there you should find the MySQL service

216
00:10:04,750 --> 00:10:06,740
and by a right clicking on it

217
00:10:06,740 --> 00:10:09,140
you can stop and start it from there,

218
00:10:09,140 --> 00:10:11,540
to stop and start your database,

219
00:10:11,540 --> 00:10:13,853
that's how you can manually control this here.

220
00:10:15,850 --> 00:10:16,790
And now with that,

221
00:10:16,790 --> 00:10:20,570
we got that SQL server installed and started

222
00:10:20,570 --> 00:10:23,867
and we are now able to interact with it.

223
00:10:23,867 --> 00:10:25,510
And to interact with it

224
00:10:25,510 --> 00:10:29,240
I wanna use this MySQL workbench tool

225
00:10:29,240 --> 00:10:32,853
which was also installed as part of the installation.

226
00:10:33,710 --> 00:10:37,570
So on windows, you can just open your start menu again

227
00:10:37,570 --> 00:10:41,013
and search for MySQL workbench to start that.

228
00:10:42,260 --> 00:10:45,230
On macOS, if it was not installed automatically

229
00:10:45,230 --> 00:10:46,940
if you can't find it there,

230
00:10:46,940 --> 00:10:50,220
you can search for macOS MySQL workbench,

231
00:10:50,220 --> 00:10:52,940
and choose this download option here,

232
00:10:52,940 --> 00:10:56,610
where you can download the MySQL workbench for macOS,

233
00:10:56,610 --> 00:10:59,000
you can also download it for different systems there

234
00:10:59,000 --> 00:11:00,370
if you need to,

235
00:11:00,370 --> 00:11:02,610
and then download this here,

236
00:11:02,610 --> 00:11:04,693
again, without creating an account.

237
00:11:05,920 --> 00:11:07,240
And once this download finished,

238
00:11:07,240 --> 00:11:09,750
we can also set up that MySQL workbench tool

239
00:11:09,750 --> 00:11:10,583
here on macOS.

240
00:11:12,560 --> 00:11:15,690
So here we go, starting this tool now,

241
00:11:15,690 --> 00:11:17,480
now here, that's a simple installer

242
00:11:17,480 --> 00:11:20,513
we just rack that into the applications folder here.

243
00:11:25,200 --> 00:11:27,153
And once that finished.

244
00:11:28,830 --> 00:11:33,830
I can start the MySQL workbench here on macOS as well.

245
00:11:33,830 --> 00:11:37,003
And then here both on windows and on macOS,

246
00:11:37,850 --> 00:11:42,850
you should see you're running MySQL database server here

247
00:11:42,920 --> 00:11:45,940
under my SQL connections on the starting screen,

248
00:11:45,940 --> 00:11:47,100
if you don't see it,

249
00:11:47,100 --> 00:11:50,450
make sure you start it that MySQL database server,

250
00:11:50,450 --> 00:11:53,540
So on the windows that you started this service,

251
00:11:53,540 --> 00:11:56,000
in macOS in the system preferences

252
00:11:56,000 --> 00:11:58,073
make sure to server is running.

253
00:11:58,990 --> 00:12:03,780
And then you can click on that once and enter this password,

254
00:12:03,780 --> 00:12:08,070
which you chose before during the setup process,

255
00:12:08,070 --> 00:12:11,190
so that route user password you chose before,

256
00:12:11,190 --> 00:12:13,900
and then with that you should be able to connect

257
00:12:13,900 --> 00:12:15,930
to this MySQL workbench

258
00:12:15,930 --> 00:12:18,480
and you should see something like this

259
00:12:18,480 --> 00:12:20,423
or this on the windows.

260
00:12:21,400 --> 00:12:24,960
And now that's the graphical user interface

261
00:12:24,960 --> 00:12:28,780
which we can use for working with our database server

262
00:12:28,780 --> 00:12:32,030
and with the databases and the data in there.

263
00:12:32,030 --> 00:12:34,830
And you got various areas here

264
00:12:34,830 --> 00:12:36,970
for managing the server itself,

265
00:12:36,970 --> 00:12:40,280
for a seeing its status, configuring it,

266
00:12:40,280 --> 00:12:42,330
but unless you know what you're doing

267
00:12:42,330 --> 00:12:44,910
you should keep the default there,

268
00:12:44,910 --> 00:12:49,910
and then you will also have does schemas area here

269
00:12:49,960 --> 00:12:52,660
where you can see the various databases

270
00:12:52,660 --> 00:12:54,853
on this database server.

271
00:12:57,350 --> 00:13:00,340
And that's now the part with which we'll continue

272
00:13:00,340 --> 00:13:01,513
in the next lecture.

