1. Computing

Installing MySQL on Windows

By

The first step in learning anything computer based is usually to install something. Today we're going to help you install MySQL on a Windows PC. Just like with other web-centric technology, installing things on your home computer can really help you learn how things work, and can be used as a sandbox for trying new things out.

As with most things you do on a Windows machine, your steps may vary a little by version, and depending on your UAC (User Account Control) settings. Logging in as an Administrator will help keep things simple, and if something doesn't work right the first time, try opening it back up by right clicking and selecting "Run as Administrator".

It should be noted that virus scanners and MySQL don't always play nice together. This is for a number of reasons. For one, any active shield type virus protection will slow down MySQL queries, and cause you to think things aren't going right. Secondly, they tend to view MySQL databases as spam, to be deleted. You can usually get around this by telling your virus scanner to ignore the main directory you keep your MySQL data in. This of course depends on your virus scanner, but usually isn't that hard to do.

MySQL has put together a nice installer for Windows that takes care of installing all things MySQL, from Community Server to MySQL for Visual Studio and Excel. You don't have to need everything to use this installer. If you just want the basic server, here's a link to that as well.

The first thing you need to do is, obviously, download it. You'll get a .zip wherever you choose to put it, which is a zipped up archive of the installer.

Open that up with whatever you use to open zip files, and you should have a .exe file which is the actual installer.

Double click that (or right click and "Run as Administrator") and click Next on the wizard that pops up.

Already our paths diverge!

If you have apache installed: here you want to select custom, and change the install directory. If Apache is in C:\Apache\   then you want to install to C:\Apache\MySQL\  

If you don't have apache installed, just click next until the next button changes to install.

It might ask you to sign up to MySQL, you can do this if you want, but for the purposes of this article I'm assuming you skipped it.

The last step will ask you if you want to configure the MySQL server. Make sure this is selected, and click Finish.

A new Wizard will pop up, which will help you set up MySQL. Click Next to start.

Check Standard Configuration, and click Next.

Select both install as Windows Service, and Launch MySQL Automatically, and click Next.

This window will ask for you to set a root password to access your MySQL server. Type it in, and make sure Enable root access from remote machines is selected. Don't forget your password! Then click Next.

Click Execute, then Finish.

Now you should be ready to go! To test, you can look for the Command line client, included in the installer. It should have made a shortcut in your start menu under MySQL.

Now you're ready to start learning. If you have any problems installing, or run into any issues configuring, dev.mysql.com has some good pages on the installation process, including custom installation, like if you want your installation to be ODBC or .NET compatible.

  1. About.com
  2. Computing
  3. PHP / MySQL
  4. PHP/MySQL Basics
  5. Installing MySQL on Windows

©2014 About.com. All rights reserved.