7 days of WordPress plugins, themes & templates - for free!* Unlimited asset downloads! Start 7-Day Free Trial
FREELessons: 16Length: 1.5 hours

Next lesson playing in 5 seconds

Cancel
  • Overview
  • Transcript

1.2 Prerequisites

In order to successfully follow along with this course, you will need to have MySQL installed. In this course, I will be using the version of MySQL that comes installed by default with the MAMP stack. If you would like to follow along with my setup, you can install MAMP for yourself, or you can download MySQL directly from the MySQL website.

Related Links

1.2 Prerequisites

Before we dive into MySQL and working with it, I wanna take a couple of moments to talk a little bit about some of the prerequisites and some of the requirements that you're gonna need to have fulfilled, in order to really follow along effectively with this course. The first thing is you're gonna need to have a basic understanding of PHP. Now I'm not gonna be digging into the world of PHP that deeply. I'm really gonna be making the assumption that you already know a little bit about it. This course is gonna be primarily focusing on the MySQL aspect and how you can start to build out your database and create your database structure for your application with some common concepts that you're gonna run into quite a bit out there when you're developing your applications. But from the PHP from the applications side, I'm gonna assume that you at least have a basic knowledge of it. And if you do or you don't and you would like a little bit of a refresher, then I would highly recommend you heading over to tutsplus.com and taking a look at the PHP fundamentals course. There's a lot of really great material out here that's going to get you up and running, very quickly, on a lot of different topics. Now if I were to pick a couple that would be good for you to follow along with, I would highly recommend in section 1, the 1.2 What You Need video which is going to detail some of the software that you're going to need, how to install PHP, how to install MySQL. And in this particular course, you are going to see how to install those things using the MAMP Stack. And we're going to talk about that in just a moment and what that is. But it's a nice refresher to kinda get you up and running as to how to install it and how to kinda get in and out, and work with it. Also, I would highly recommend you coming down to section six and reviewing some of the basics of the PHP and MySQL interaction. Especially 6.1 where you're gonna get an introduction to MySQL, the PHP MySQL admin page which will be very important for you to be able to take a look at so you can see how to interact with the database from a web based perspective if you wanna do that. Although in this course we're gonna be primarily focusing on the command line tools. Which I feel is very important for you to be able to understand to really appreciate the power of MySQL, and ultimately when you get back into PHP, you're gonna need to know how to write some basic queries, and that's the type of thing we're gonna be covering in this course. So once you have a basic understanding of PHP and MySQL, you'll be good to go. Now, once again, I did mention that you are gonna need to have MySQL installed, and there's a couple of different ways you can do that. First of all, you could actually head over to MySQL, and you could go ahead and download it on your own, and that would be absolutely fine. You can head over to dev.mysql.com/downloads/mysql and you can download the community server. That will be fine for what we're trying to do here. Now, if you already have MySQL installed, then don't worry about this step, but all you have to do is head down here and select your operating system, and then download the appropriate version for your operating system and install it. It's a fairly basic install, it's a next next finish type thing. So you can really hang onto most of the defaults and you should be just fine. Now if you don't want to go through the process of manually installing just MySQL and you want to install more pieces like PHP and Apache to actually create a full web server on your development machine so you can work on a full web application, which is probably not a bad idea. Then you can also go the route of installing a stack, or MAMP is the one that is mentioned in the PHP fundamentals course, which is one that I happen to have installed and really enjoy. So really what this is, it's a combination of Apache, MySQL, and PHP all together in one installation. It's one download, everything gets installed and run for you which is really beneficial to kind of get things up and running as quickly as possible. So if you don't have anything installed on your machine just yet, I would highly recommend going this route and you can get that at mamp.info. Now you're also going to need some sort of terminal or command line application. You can absolutely use the one that is built in to your machine, whatever platform you're on. You can use command prompt or PowerShell in Windows or you can use the Bash Shell or terminal in Unix based operating systems. I tend to use iTerm. I'm on a Mac. I like my iTerm application. So if you're curious as to what I'm using throughout this course, this is what I'll be using. But once again, you can use just about any text editor that you would like. Now once you have MAMP installed, and you have a terminal application installed, you're gonna wanna go ahead and start MAMP. Now the way that this works is that MAMP is an all-in-one application that typically has some sort of kind of interface like this. And when you first start it up, it's gonna look somewhat similar to this, and you're gonna see Apache and MySQL Servers mentioned here. Now by default these things will not have little green dots next to them, they'll probably be empty or blank. And you're gonna need to start so you'll see a button here that says start server and now mine is currently running and so mine says, stop server. So what you're gonna wanna do is your gonna wanna get those up and running. So go ahead and click those buttons. Now the other thing that you're gonna wanna pay attention to is when this is up and running, can I actually get to the MySQL command prompt and that's gonna be very important. So now that I have this up and running, I want to make sure that I can actually get into my sequel from the command prompt. So I'm gonna open up my terminal here and depending on your operating system, depending on how you installed everything, you might be able to get away with this is just typing MySQL. Now in my case that's not gonna work, I don't have this in my path. So on a MAC the way that this is going to work is, it's going to be installed in your applications directory under MAMP, and then you're gonna want to go into your /library/bin/ my SQL. Now once I've done that, I can go ahead and execute that. And as you can see, I'm into MySQL. I have my MySQL command prompt and I'm ready to go ahead and type in any sort of commands that I would like to. Now if you get to this point and for some reason it's complaining about a user name and password, then you might have to do a little bit of extra work. Now by default when you install MySQL, the password is going to be blank or there isn't gonna be password so you'll want to use some command line parameters to specify the username and password. And by default the username is going to be root and the password is going to be know there will be no password. Now if for some reason those things continue not to work there is some documentation over on the MySQL website that I will leave a link to in the description of this video that will explain to you how to reset that root password on all the different systems. So you can do it on Windows systems or Unix based systems, whatever machine type you're on. And then at that point, once you've actually reset your password, if you had those troubles, you should be able to go back into your terminal, and then get your MySQL command prompt up and running. So once you've done that, once you've been able to successfully get to the command prompt just like this, then you're ready to go. So let's start to actually dig into the world of MySQL.

Back to the top