‫All right, guys, so what I'm going to do since I already have my SQL installed on my machine, if
‫you're on a mac, I'm just going to kind of go through and let you know what to do.
‫And for the next few videos in the sandbox, you'll have the documentation for that particular video.
‫So this one, for instance, shows you how to install MySQL on Mac OS.
‫So I'll just go through it real quick.
‫If you're using Mac OS, you can install MySQL using homebrew.
‫Homebrew is a package manager for Mac OS, and all you have to do is if you don't have homebrew installed
‫is just copy this, paste it in your command line.
‫Okay, so just open up your command line.
‫I'm using Iterm, but you can use whatever you want.
‫So you would just open this up throw it in there.
‫That will get install homebrew.
‫After you do that you can simply run brew install MySQL.
‫Okay.
‫So that will install MySQL.
‫Then you want to start the service.
‫So basically you run your MySQL database as a system service.
‫And you can do that with brew services.
‫Start MySQL and you can stop and reset the MySQL server with these commands.
‫Brew services stop MySQL Bruce services restart MySQL.
‫Now it is recommended that you secure your installation and you can do that with this command here MySQL
‫underscore secure underscore underscore installation.
‫And this will allow you to set the password for the root user.
‫So basically when you install MySQL you get a user named root.
‫And by default that root user does not have a password.
‫So you can keep it like that because it is your local machine.
‫But it is recommended to add a password.
‫So if you want to do that you can run this.
‫But it's not like it's your the database that you're going to be using in production.
‫So when you use a production database, you want to have, you know, a different user than root and
‫you'll want to have password and so on.
‫So once you do that you can log in to MySQL through the command line using this command.
‫And I'll show you that now.
‫So if we say MySQL dash u and then as we're saying we want to log in as the root user and then dash
‫P, it'll ask for the password, which on this system I don't use the root user I think.
‫I think that's it or not.
‫Let me just try that again.
‫Okay, so I actually don't have a password for the root user on this system.
‫And you can see now my my prompt right here now says MySQL.
‫So I'm now in the in the command line for the database.
‫I can say show databases.
‫And you want to just end it with a semicolon.
‫And it shows me the databases on my system.
‫All right.
‫And I'm going to go through this in a couple videos from now.
‫For now I'm just going to say exit.
‫Okay.
‫So now I'm back out into my regular terminal.
‫All right.
‫So that's all you have to do now you have MySQL installed on Mac.
‫In the next video I'm going to show you what to do if you're on windows and using Larrigan.