You are here

MySQL installation on Windows XP

Submitted by Peter on Tue, 2010-06-01 10:37

Technology:

MySQL is easy to install on Windows and the installation is almost the same across all versions of Windows.

There are several decisions to make during the installation process. The following list contains decisions where you may use something other than the default.

Alternative installation methods

The main reasons for a manual installation of MySQL are to learn about the MySQL installation and installation options. You might consider saving time by installing MySQL as part of a package including the Apache Web server and PHP. Here are alternatives recommended by people who use these packages.

  • Zend Server Community Edition for Windows, Linux, and the Apple version of Unix. Thank you to Val Paliy for suggesting this alternative.
  • XAMPP for Windows, Linux, and the iPad iMac.
  • WAMP for Windows.

Download

Download MySQL from dev.mysql.com/downloads. Select the MySQL Community Server then the the Generally Available (GA) Release, in this case 5.1.

32 bit or 64 bit

You can choose 32 bit or 64 bit versions. I used a 64 bit version because I am using Windows XP 64.

MSI or ZIP

You can choose between the MSI versions for easy installation or the ZIP versions for manual installation. Use the MSI version.

The essentials or a developer version

You can choose a regular version, the Essentials, at 30 MB or a bloated 100 MB version for developers. The bloated version contains documentation that will be out of date by the time you read it all. I chose:
Windows (x86, 64-bit), MSI Installer Essentials - Recommended

Download the file, mysql-essential-5.1.47-winx64.msi, to a directory away from your c: drive. Keep a spare disk, perhaps a USB disk, for all your downloads of the software you install on your computer. You can then use the software on other computers.

Administrator

Switch to your administrator login. XP 64 lets me work in the administrator login without logging out of my regular user session. This is safe for an initial installation. Log out of you other user accounts before an upgrade because those accounts could be using an application that uses the software you are upgrading.

Start the installation

Start the installation by double clicking on the installation file, mysql-essential-5.1.47-winx64.msi, or you can right click then select Install. you will see the following Welcome screen. Select the Next button.

Welcome screen showing the MySQL dolphin logo

You will see the following Setup type screen showing three options, Typical, Complete, and Custom. We will use custom this time around to see all the options. Custom will show the defaults used in Typical and you may choose to use them in the future. Complete is equivalent to selecting everything in the subsequent Custom setup screen. Select Custom then Next.

setup type screen showing the three options

The following Custom setup screen lists a few options. One has undisplayed sub options so I opened that list before taking the screen shot. The defaults are fine for what we want. We could use the Typical option for this part.

Custom setup

The ready to install screen lists the selected options and offers the Next button. Select Next.

Ready to install screen showing your selections and the Next button

The MySQL installation process will then display some advertising pages, two in 5.1.47. Select Next at each advert.

Advertising screen showing the enterprise options from the pages where you downloaded MySQL

The following Wizard completed screen shows two options, Configure the MySQL server now and Register the MySQL server now. Switch off the registration option then select Finish.

Wizard completed screen showing the two options and the finish button

Server instance configuration

This is the point where you configure the MySQL server that will run on your machine. We set it up as a service so it is running all the time and can be used by any application.

The Server instance configuration wizard screen has only one useful option. Select next.

Server instance configuration wizard screen showing next and cancel buttons

The Server instance configuration type screen shows two options, Detailed configuration and Standard configuration, plus the Next button. Use the default Detailed configuration to see all the questions relevant to your installation. Select Next.

Server instance configuration type screen showing two options and the next button

Server type

The next step is to select the server type. The choices are Developer machine, Server machine, and Dedicated MySQL server machine. We will not use Dedicated MySQL server machine.

Developer machine is a good choice for smaller laptops short on memory.

Server machine is the right choice for fast desktop machines with lots of memory and will let you test Web sites with lots of data. When you are working on an existing sites, you can copy the whole database to your machine and run lots of intensive testing using an automated testing tool.

Server instance server type showing the three choices and the next button

InnoDB or MyISAM

The next choice is the type of database engine. MyISAM is the original MySQL database engine and you will always need MyISAM for Web work. InnoDB was the alternative for transactional updates. Now they are both in the same package so try both. MyISAM is faster in some situations and offers more flexibility for large databases. InnoDB is limited in size by cramming everything into one file. You will not see a difference in test sites. A site with millions of users will need the table splitting and clustering options in MyISAM.

The following screen shows the database usage options. The first choice installs InnoDB and MyISAM. The second choice installs only InnoDB. The third choice installs only MySQL. Use the first choice, the default, because you can experiment with both InnoDB and MyISAM.

Server instance database usage screen showing three choices and the next button

InnoDB storage location

InnoDB stores everything in one file and needs a location for the file. Select the location. The default is fine for a computer with a single disk. When you have more than one disk, you usually want to move the data files away from the system disk for better performance and easier backups.

Server instance innodb tablespace settings showing the disk and directory selections

The following screen shows the drive selection changes from c to h. MySQL proposes a directory name of MySQL Datafiles. I can use that directory and copy old MyISAM databases into the directory because the MyISAM engine automatically recognises all the databases in the directory.

Server instance innodb table space for drive h

Concurrent connections

The Server instance concurrent connections screen shows three choices, Decision Support (DSS)/OLAP, Online Transaction Processing (OLTP), and a Manual setting. The default, Decision Support, is fine for our requirements. Select Next.

Server instance concurrent connections screen showing three choices

Network options

You can choose to allow access to MySQL through TCP/IP. If your local network is protected by a firewall then allow TCP access so you can experiment with access across the network. In most cases you do not allow TCP access because your database is behind a Web server and the Web server provides access using Web services.

You always use Strict mode. Occasionally you might need something else to test a very old application against a very old database but you usually do that on a separate test machine because you will need lots of very old software.

Server instance network options screen showing the TCP and Strict mode options

Default character set

The character set choice in the following screen is just a convenience because you can change the choice for each database. Choose Best Support For Multilingualism because you will need UTF8 for most new projects. Select Next.

Server instance default character set screen showing three choices

Install as a service

Install Windows as a service so it is automatically started and available everywhere. Do not worry about the path option because you should never need the command line with modern software. Select Install As Windows Service then Next.

Server instance windows options screen showing the Windows service and path options

Password

You need a password to access MySQL. Enter a password in the security options screen, shown in the following screenshot, and select Next.

Server instance security options screen with boxes for password entry

Ready to execute

The following screen shows the start of the execution phase. The screen will step through the items shown on the list. Some will take several seconds with no indication of progress. Select Execute.

Server instance ready to execute screen showing a list of steps

Processing configuration

The final screen in the installation is the following screen where you select Finish to finish the installation.

Server instance processing configuration screen confirming all the steps are complete

Menu entries

The following screenshot shows the menu entries produced by the MySQL installation. Delete the registration entry because it is a waste of space. Surely the installation procedure can remember your choice to not register and leave the registration entry off the menu.

mysql menu entries before editing