Now you can,
of course install MySQL this database system
on all operating systems.
On windows, on macOS and on Linux.
Now here, I'll start on a Mac
but I'll also show you the windows set up process
in this same lecture here.
Now for the macOS setup,
you can just search for MySQL macOS
and you should find this download MySQL community server
option here which you can click,
and that should take you to this page here,
there you can actually also choose
different operating systems
but I'm going to go with macOS
but if you're following along on windows,
you can also choose a windows already if you want to,
and on macOS here we now got various options,
on windows we also got various options by the way.
And the difference between these options simply is
what's included or not.
On macOS here, we got four options
and actually it's the first option which we want here
because that will be this well executable file
which we get,
which has 400 megabytes
because it's actually already includes
all the MySQL related elements that we could need,
that is the database server itself
so to thing that we'll host our databases
but then also tools for connecting to the database
and for playing around with it.
Now on the windows we only got two options,
at least at the point of time and recording this
and we got a very small option
where we don't have to download much
and then a larger option.
Now here, the difference is that with the small option,
which is the one I recommend using,
you will get a very slim installer
and during the installation
you can choose what you wanna install,
and then you will only download these pieces,
which is a bit more efficient than downloading everything
and then only using some parts of it.
So therefore on windows I'll choose the smaller option
and download that,
on macOS I will choose this first option here,
which is this DMG archive.
Now, either way if you click on the download button here,
you will be taken to this page
and it might look like you have to sign up there,
but actually you can continue without signing up
and just start to download,
which is what I do here.
And now we'll just wait for that to download to finish,
on windows, of course
it's will be very quick because it's much smaller
on macOS it will take a short while.
Now the downloads finished on both systems now for me
and I'll again start with macOS
and show you the windows steps in a couple of seconds,
and on macOS I will execute this downloaded file here,
and that will give me such a executable inside
which is the downloader I can execute,
I'll allow access here.
And now here,
I got the installer for the MySQL tools on macOS,
so here on macOS I will click continue,
accept the license here, continue
and then click install here,
enter my password when being prompted for it,
and now this will install me all these SQL tools
onto my Mac.
Now let's wait for that to finish here,
and in the meantime,
let's see how that would work on windows,
on windows we also can start this installer,
and as I said here, I downloaded the installer,
which doesn't include anything,
but where we instead have to pick what we wanna install,
and here we now definitely wanna pick MySQL server,
which is the thing that will actually host our databases,
and use the latest version here,
and you can use the latest version you have here
at the point of time you are viewing this.
What I teach you will apply to that version as well.
So you'll pick that version
and add it by clicking on this arrow.
And then we also wanna install another tool,
which is called the MySQL workbench.
This is a graphical user interface,
which we will be able to use to interact with that database
and that's a great tool for administrating the database,
but also for playing around with it
and run queries against it
in a nice graphical user interface.
So for learning how to use SQL,
we definitely wanna install that
and hence, I also pick this tool
and add it by clicking the arrow,
and then we can continue here.
Now, these tools will be downloaded,
and then once they were downloaded
they will be installed.
Now, on macOS I already downloaded everything
and everything was installed,
and therefore, now here
we now actually continue with the configuration
of the installed software.
Now, here on windows,
we actually, first of all
have to choose our configuration type
and we can keep all the defaults here,
nothing we have to change here
on macOS I'm not prompted to choose anything there,
but since we kept the defaults,
that will be fine here as well.
And then as a next step,
we have to choose our password encryption method
and we can use the strong one here,
so we can choose that and click next.
And then as a next step,
we have to set a password for our route user,
both on windows and on macOS.
And then choose a password which we will use for connecting
to the database.
And for this it's important to understand
that what we set up here
is actually a server for our databases,
a SQL server for our databases
that will run on our local machine,
just as we ran the web development server
locally on our machine for development
over the last cors sections,
therefore this server will also run locally
on our local machine,
and we will be able to connect to the server
to then interact with the databases
and the data stored in there.
And therefore we need to set up credentials
that can be used by us by our web application,
by our website for example,
to connect to debt database server.
So it's a server, just not serving a website
but databases
and we need to be able to establish a connection.
For our web server no credentials were required
because everyone should be able to send requests
to our web server,
but for the database server that should not be the case,
not everyone should be able to connect to it
instead, we want to control who can connect.
And therefore we have that user,
we have that default the route user,
and we can now set up a password that will be required
when you want to connect to that database server.
And you can set that password on your own here
and on windows also confirm it.
And then with that on macOS I'm done,
and I'll finish this in a second.
On windows I'm not done yet,
instead in the next step
I'm asked whether I wanna start MySQL server
as a windows service,
and I will actually keep this checked
but I will disable this checkbox
that it should always be started when my system starts up.
I don't want to always start the database server
just because I rebooted my system.
Instead in a couple of seconds,
I will show you how you can manually start
and stop this SQL server service
and that's the approach I will use here.
So therefore here I'll disabled this,
but keep the first checkbox checked and then continue.
And with that, I'm done there as well
and we can click next,
and now all these setup and configuration steps
will be performed,
and here on macOS I will now also click finish.
Confirmed as with my password
and now all the initial database setup
will be performed there as well.
So now I'm done here,
on windows I'm also done
and I'll also close this on macOS.
Now, on macOS the SQL database server already started
because I had this checkbox before I finished the set up,
but on macOS to now control this server
and start or stop it,
you can now open your system preferences,
and there you'll have this MySQL option
where you can actually stop this MySQL server
and then restarted it
and you can also check whether should always start
when your computer starts,
and I'll disable this for example,
I don't always want to start the database,
and I can stop the server here if I want to.
And I can start the server here
if I then want to work on it again,
and it will start it now
because we will work with it in a second.
We can also configure it here,
but the default configuration should typically be fine.
Now on windows, I now did set it up as a service
and it was automatically started as a default,
if you want to stop or started manually,
you can open your command menu
and just search for services there
to find this services menu,
and then in this services menu
you can scroll down to M
and there you should find the MySQL service
and by a right clicking on it
you can stop and start it from there,
to stop and start your database,
that's how you can manually control this here.
And now with that,
we got that SQL server installed and started
and we are now able to interact with it.
And to interact with it
I wanna use this MySQL workbench tool
which was also installed as part of the installation.
So on windows, you can just open your start menu again
and search for MySQL workbench to start that.
On macOS, if it was not installed automatically
if you can't find it there,
you can search for macOS MySQL workbench,
and choose this download option here,
where you can download the MySQL workbench for macOS,
you can also download it for different systems there
if you need to,
and then download this here,
again, without creating an account.
And once this download finished,
we can also set up that MySQL workbench tool
here on macOS.
So here we go, starting this tool now,
now here, that's a simple installer
we just rack that into the applications folder here.
And once that finished.
I can start the MySQL workbench here on macOS as well.
And then here both on windows and on macOS,
you should see you're running MySQL database server here
under my SQL connections on the starting screen,
if you don't see it,
make sure you start it that MySQL database server,
So on the windows that you started this service,
in macOS in the system preferences
make sure to server is running.
And then you can click on that once and enter this password,
which you chose before during the setup process,
so that route user password you chose before,
and then with that you should be able to connect
to this MySQL workbench
and you should see something like this
or this on the windows.
And now that's the graphical user interface
which we can use for working with our database server
and with the databases and the data in there.
And you got various areas here
for managing the server itself,
for a seeing its status, configuring it,
but unless you know what you're doing
you should keep the default there,
and then you will also have does schemas area here
where you can see the various databases
on this database server.
And that's now the part with which we'll continue
in the next lecture.