In this video, I'll show you how to install my SQL on Mac computers.
Windows and Linux users.
Please watch the other videos.
So what we need to install is my SQL Community server so you can search on Google for that.
The first results point to dev dot mysql dot com slash downloads slash MySQL.
You want to click there.
That should take it to this page.
So make sure that Mac OS is selected here.
And here you can filter out the results for either ARM processors, which are the new M-SERIES processors
or the older intel processors for this second option.
Or you can just leave it all and then find the appropriate processor in here.
So for me it would be the arm processor.
So I'll just download this file.
In the next page, you may want to log in or sign up for an account, but that's not necessary.
So you can just click on.
No thanks.
Just start my download.
Now.
That should start downloading the DMG file.
Once the downloading is completed, you want to go to the downloads folder and double click on that
DMG file.
Then double click on the Pcgg file here.
I'll present a low.
Continue.
Agree.
And then press on install.
You may be asked to enter the password of your Mac user account.
Then you'll be shown these two options.
So make sure to select the first one.
Use strong password encryption.
Click on next.
Then here you want to provide a new password for the user route.
So this user route will be one of the database users.
So as I mentioned in the previous video, my SQL supports multiple database users, so the user is route
and the password for the user routes will be, I suggested to use the same password as me because you
might forget it.
I'll just use the password.
Python course.
No spaces, just small letters.
Python course.
You may leave this option as checked and press on finish.
Perhaps you may be asked to enter the password of your Mac user account once more.
So don't confuse the Mac user with the database user.
They are different things.
So then I'll press on.
Carlos, move the installation file to bin if you like.
And that will delete the file from the downloads folder.
And to check if MySQL was installed correctly, you want to go to the Apple icon here and then you want
to go to system settings.
And then here in the search, you want to look for my SQL.
So my SQL is installed as a service in the settings, so you can click on that and this will open up.
So here you can start or stop my SQL Server.
So mine has already started.
And this is where you can also uninstall my SQL using this button.
So for now, I'll just close this window.
This has been installed correctly, but then you want to open the terminal and you want to check if
my SQL.
Can be accessed from the terminal.
Initially, it may say that, Oh, this command was not found.
That's because the MySQL command now has to be added to the path.
To do that, you want to do touch dot bash profile, press enter, and then you want to open that bash
profile file.
So that will open it with a text editor.
And here you want to do export.
With small letters.
Path is equal to.
Let me zoom in.
A dollar sign, two curly brackets, and inside the curly brackets, you want to write path again.
And then here a column.
So no spaces.
There's a space here, but here you have a column.
And then here you want to specify the path to my SQL.
To find that path, you want to search on spotlight for slash user us or.
So that will show up.
This folder us are so open that then you want to go to local the local folder.
Then you want to go to MySQL minus the version, whatever you have there.
In my case it looks like this.
So click that folder and then you want to press the option key and then right click over bin.
And then you want to go to copy Bin as path name.
So we're copying the absolute path of this bin folder.
And then you want to go back to that text editor here and you want to paste that path, right?
So there's a path slash us or local MySQL minus eight, etc. slash bin.
No, you want to copy that entire path first to have it in your clipboard.
You want to close this window.
If you are asked to save the file, press on.
Yes, to make sure that you save the file.
And then you also want to do the same with touch dot z as h.
R c.
This is another file where you want to insert that path so that command makes sure to create that file
if it does not exist.
And then we open that file that's that s, H or C.
I do have some existing content in here.
So what I want to do now is I want to go to the next line.
If you have an empty file, that's okay.
You can just paste this in the first line.
So in my case, I pasted it in the second line.
So that's the line we wrote previously.
So make sure to do command X and then close this so that that file is saved.
Then you want to quit the terminal, so make sure to quit it with that or commands queue.
And then you want to open the terminal again.
No.
We should expect my school to be recognized.
So let's do my school.
Minus U route, minus P.
This command now should start the my SQL server with use roots.
So that's a flag which declares the user.
The user is root for my case, but also for you.
That's the default username.
And minus p means.
Now if I press enter.
Will be asked to enter the password If you got an error that MySQL MySQL was not recognized properly.
You need to restore to quit the terminal and then open it again.
And also double check the export line that we wrote, which we added in those two files and then quit
the terminal again, come here and run this command again.
So now for the passwords you need to enter Python course.
That's the password I chose for my user route when I was installing my skill.
So you will not see anything here when you type, but you can press enter.
And if you enter the password of user routes correctly, you should see this.
So that's a MySQL command line.
In this command line you can write SQL commands, for example, show data basis, and you need also
this semicolon at the end.
Press on enter.
Oh, sorry, I should have written databases.
So that will show you all the databases that we currently have.
So that's an example of an SQL command.
But in the next lecture, I'll show you an overview of how to use this command line.
So for now, this lecture was just to show how to install my SQL and how to make sure it works.
So if you got this, then my SQL is working.
It's ready to be used either from the terminal or from a Python script.
So that's about this video.
Thanks.
See you later.