How to Install MySQL Server on Windows

hey guys what's going on it's clever ticking and in this video we're going to learn how to install MySQL on windows 7 and make it work with PHP so if you haven't watched a video on how to install PHP and mysql and windows seven please do that first so let's get started here open up the browser gonna go to death . my SQL dot-com / downloads / mysql and we're going to download mysql communities server scroll down here now here's the latest on mysql installer and it says it's a 32-bit and 64-bit installer but when we click here on download and scroll down we get it's only showing 32-bit right so they have a note about that actually say no mysql installer is 32-bit but it will install both 32-bit and 64-bit binary so the actual version of your mysql will be either 32-bit or 64-bit depending on your operating system but the install itself really doesn't matter so it's a 32-bit version and we we want to get the mysql installer web community . six . 26 msi and the difference here in file size so dramatic because the installer the web distance for basically what it means is the installer is going to download mysql server from the installer from within installer and if you download this ill just download last kill server right away i found that it's faster to download install MySQL from within nice dollar so i'm going to hit download to download my scale and still install our web community and then you're gonna have to create the account by clicking out sign up and just filling out this form here make sure you enter your email and you're a true email because you're going to get a confirmation link so we're going to trust you guys know how to do this already have an account so I'm just gonna log in/sign in download and this download is very fast take time at all going to go ahead and run it and i'm just going to get you guys to this installation process going to wait a little bit till this loads until windows configures mysql install the community and definitely taking longer than I thought alright Aereo's okay to get this window and I have more adventure installed but what you want to do is go ad accept terms freedom course next with expanded MySQL servers expand go server click on that span and this is a 64-bit and this on a study to get so just get the one unique and press this arrow now it's added for the products installed click Next and I i I'm just gonna install it to the default path click Next again oh it already exists ok whatever i'm going to say yes I download execute and that was very fast so now just installing it and I'm just gonna wait to write complete next ready to configure next and I just leave all these settings default next and this is the password that you're going to be using to connect to mysql so he definitely want to memorize it or write it down somewhere are like a spell okay and just click Next and yes you wanna figure it as my SQL server $YEAR and windows service and start my cell service system startup click Next and it's quick execute and everything works out everything should be successful if this was some reason doesn't work if the if the server doesn't start recommending you restart windows and do this whole thing over again because that happened to me and rebooting windows work so we're going to finish everything is successful operation complete next and finish and now we should have to close this is just going to verify that my SQL service running and I'm gonna go to why start and you can type services services and find mysql 56 and it is started so MySQL is now running on your machine now whatever come in you guys do is add mysql to your environment variables path that way you're going to be able to access my SQL server from command prompt which will be very convenient in handy so here's how to do it go to start and actually it also counts with a command the newest version comes with a command laying this think it's a new feature so you can click on that and you type the password that you created earlier boom it's connected to mysql from the command prompt and it's going to say that version and everything so that means you have successfully connected to mysql and everything's working so you can either use this command line that counts with but if you want to set it up so you can run it from my command line when you show you how to do a real fast step in choir and mint and go in edit environment variables for your account and then find scroll down until we find a path we're going to edit that and we're going to add the path of mysql executable and for that I go to the directory where mysql has been installed should be on mine is on c drive program files and mysql mysql server 5.6 go to the bin folder and you want to copy this Sun this path so go ahead and copy because that's where the mysql executable file is closed that and make sure you go to the end or to the front of this let's go to be and actually and say my Colin which is a directory separator and paste the path to the mysql that executable and click ok click OK again and now we can test out this everything's working from the command prompt start mysql dash you root Dash P press enter type the password and it should be connecting to the mysql and now we are we can connect to mysql from the command prompt so that's how you added to the event price let's move on here last thing that we do is make my square my SQL work from the PHP dot ini so go ahead and open up your php.ini wherever you install PHP go to your PhD directory- see PhD and i'm going to edit HP at 9i an i and i'm going to search for mysql I and it's going to find these extensions here you're going to want to uncomment this extension here so just remove the semicolon if you have a semi call in front of it remove it also remove this am i calling front of PHP mysql I and i also recommend uncommon in this one the last q PDO because some of the frameworks and scripts use my skills video and this is just another way of connecting mysql so just uncommon those three wines those two and this one make sure you save your php.ini file and close it and then you definitely want to restart apache and you can do it through the monitor what I'm just going to access my services and click on apache and we start that is going to restart apache close the window cause this and and now we're just going to create and test script to make sure well first of all let's just see if the match extension is loading can help open up a browser here go to local host brother localhost and i'm going to access my PhD that info file which has which translate phpinfo in it and then i'm going to search for mysql and you guys have this showing up with the bunch of lines go information that means mysql floating successfully so you should have mysql mysql I my skill and V and your mysql those old should be loaded because we just uncommon on the oldest mysql lines so extensions that are being loaded in PHP now lastly let's just create is correct to make sure that we can connect to mysql from PHP I'm gonna go to my localhost and if you guys missed my other video is just let me show you this is the code that's inside that PHP file ok and create a new file in mysql I in the localhost or your web file scale and create file called MySQL dot PHP and then just put the following code inside that file and I'm going to put on i'm going to put that code below this video so yes you don't want to type this you can just copy and paste the code and just type your look localhost exactly like that route for the username and then type the password that you have set up earlier i'm just going to do this off screen and type my password going to save the file and exit and then lastly let's go ahead and see if the script is working for gonna go to localhost again and type MySQL dot PHP hit enter and you guess you have this message connected successfully and that means you guys are running apache mysql and PHP and everything is working perfectly together so there you have it