Database Tutorial

Course Tutorial Site

Site Admin

Install MySQL 5.1

with 12 comments

Installing MySQL is pretty straightforward, especially on a Windows operating system. However, you find differences between point releases of the product. That means simply that these should be close but may differ from the version you download.

You can download the MySQL software here. You should choose MySQL 5.1 GA (Generally Available) release. It is the most stable release as a rule that doesn’t require a costly license.

  1. After you download an Microsoft Software Installation (MSI) file or the zip file, you launch the installer by clicking the Next button:

mysqlinstall1

  1. If you want to install only one copy of the software at any given time, you can accept the default Typical radio button choice. This way, you can simply uninstall the software before you install a new version. When you want to install multiple versions on a single machine, you should check the Custom radio button. This choice lets you maintain multiple versions on your single development machine and check changes between releases. After choosing a direction, you click the Next button to continue.

mysqlinstall2

  1. The first thing you should do is upgrade the Developer Components. You do that by clicking on the down arrow to the right of the X, which yields the context menu below. Place your mouse over the top most This feature will be installed on local hard drive. After that you can begin to customize the installation.

mysqlinstall2a

  1. This is a step that you’ll see when you opt to do a Custom installation. It is important that you click the Change button and change the default directory for the installation. When you click the Change button it will launch a File Finder window.

mysqlinstall3

  1. You can put the files anywhere you choose but I’d recommend that you opt to use something like this directory path:
C:\Program Files\MySQL 5.1\MySQL Server 5.1\

As you’ll see in the screen shot mine is slightly different because my virtual Windows XP machine is a 64-bit operating system. That’s why you’ll see the (x86) as part of the Windows Program Files directory path. It indicates that MySQL will be installed in the 32-bit executable folder. You click the OK button to accept the chosen directory and return control back to the MySQL installation program.

mysqlinstall4

  1. The choice of your file directory is now displayed below the caption Install to:, and you click the Next button to continue.

mysqlinstall5

  1. Before you click that Next button, you have one more step if you plan on having multiple instances installed on your machine. You need to change the default storage location for data files. You do that by clicking on the MySQL Server Datafiles. When you click on that, you’ll see the following default file location below the caption Install to:
C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\

You click the Change button to enter another location for the database files.

mysqlinstall5a

  1. After you click on Change button, you’ll see the File Finder. You can then enter the directory that you’d prefer for the installation. My suggestion is the following:
C:\Data\MySQL 5.1\MySQL Server 5.1\

Click on the OK button to complete the selection of a customized database file location.

mysqlinstall5b

  1. You should now see the wizard screen again. Choose the Next button to continue.

mysqlinstall6

  1. This is the screen where you see what you’re about to do, before you do it. It should look like this if you’re following my instructions or like whatever you’ve opted to use in your installation. Click the Install button to begin the installation.

mysqlinstall6a

  1. The installation starts and you’ll see a dialog with a creeping status bar. It should take about 2-3 minutes on many computers but it may seem longer.

mysqlinstall7

After the status bar, you’ll see the following marketing screen. Click the Next button to continue.

mysqlinstall8

  1. The second marketing dialog then shows up, just click the Next button to continue.

mysqlinstall9

  1. The installation is now complete. You should ensure you’ve checked the Configure the MySQL Server now box. Click the Finish button to end the installation of the file system and begin the configuration of the MySQL server.

mysqlinstall10

  1. The next dialog is the configuration welcome. Click the Next button to continue.

mysqlinstall11

  1. This is an important dialog because you must choose between a Standard or Detailed configuration. You should check the Detailed radio button When you plan to install more than one MySQL version on your computer because you’ll need to control the listening port for the server. A default MySQL Sever installation sets the listening port at 3306. Typically, you’ll want the main version to run on port 3306 and set the other versions to 3307, 3308, et cetera.

mysqlinstall12

  1. This dialog lets you choose how to configure performance characteristics of your MySQL Server. As you become more skilled at MySQL, you’ll find that these are configurable in a file, but for now using the interface is probably your best bet. The choice you make here sets how much memory MySQL will take while running. Typically, you should choose Developer Machine unless this is a server installation or you have a log of extra memorty to dedicate to MySQL Server (that’s the mysqld process).

mysqlinstall14

  1. This dialog lets you configure the Inno DB files location. You should make sure that you ensure they’ll be different if you’re installing multiple releases. You click the drop down arrow for the Installation Path box, choose one and manually edit it, like shown for MySQL 5.1.

mysqlinstallation16

  1. This dialog governs configuration parameters about concurrency. If this is for a developer machine click the Decision Support (DSS)/OLAP radio button. It generally gives you more than enough connections for development activities.

mysqlinstall15

  1. This is the dialog where you enable a firewall exception and set a port. Since MySQL 5.1 is my main testing environment, port 3306 (the default) is selected. You also want to enable both check boxes.

mysqlinstall17

  1. This dialog lets you choose a multiple byte unicode character set or the standard latin1. For those coming from an Oracle world, that’s WEISO8859-1 character set.

mysqlinstall18

  1. This dialog names your Microsoft Windows Service for MySQL. It is important that you change this to represent the release. The default for every release is MySQL. You should also uncheck the Include Bin Directory in Windows PATH, and set that manually in a command shell file (e.g., a mysql51.bat file). You can run the batch file when you want to work in this environment. If you allow this to append to the system path, make sure you know which one you’re using when working with MySQL.

mysqlinstall19

  1. This dialog sets the root password. My advise is that you leave unchecked the Create An Anonymous Account and the Enable root access from remote machines boxes. Make sure you use a password that you can remember, even if it is your personal machine.

mysqlinstall20

  1. You’re almost done. The next dialog confirms you want to configure MySQL. Click the Execute button to configure the server.

mysqlinstall21

After the configuration, you’ll see the following dialog. It means you’re done.

mysqlinstall22

  1. If you encounter a failure starting the service, it’s not infrequent in any number of MSI files. I wrote another post on how to work around it here. The following is the error screen that may occur.

mysqlinstall23

This concludes your installation of MySQL.

Written by michaelmclaughlin

July 21st, 2009 at 10:35 pm

Posted in

12 Responses to 'Install MySQL 5.1'

Subscribe to comments with RSS or TrackBack to 'Install MySQL 5.1'.

  1. Thanks for installation wizard given. In case check of cross Start Service button then what should be do? Please tell me as soon as possible.

    Abdul

    7 Apr 10 at 9:45 pm

  2. There’s a link on that page to this older blog post. Click this link to a blog post that describes how to fix the problem.

    michaelmclaughlin

    10 Apr 10 at 5:53 pm

  3. Thanks for the wizard, but I had trouble understanding how to create the environmental batch file. If you could clarify this further I would appreciate it. Thank you,
    Ethan

    Ethan

    20 Apr 10 at 11:57 am

  4. We’re working on a movie.

    michaelmclaughlin

    21 Jun 10 at 10:28 pm

  5. Thank you for this tutorial, but is there one on how to get this working on a mac os? I’d really appreciate one.

    Thanks

    Bart

    9 Sep 10 at 7:23 pm

  6. MySQL is already installed on most Mac OS X installations. As covered in class, only the Windows versions are supported by our tutors and lab assistants. Oracle does not install on Mac OS X, only on Mac OS X, version 10.6. The best I have is how to configure to work in Windows on the databases installed on a VM, which you’ll find here. MySQL configuration on your Mac OS X is something that I can look at but there’s a MAMP installation post that may help you for the moment.

    michaelmclaughlin

    10 Sep 10 at 12:40 am

  7. We are asked to install mySQL 5.1 correct? Following the link you have provided, the most similar that I can find is a community server (MySQL Community Server 5.16.15). Is that what you are looking for?

    Rob Schwarze

    7 Jan 14 at 11:16 am

  8. Actually, that’s an old web page. The current release is installed on the Fedora image.

    michaelmclaughlin

    22 Oct 14 at 1:12 am

  9. hopefully there is Linux guide, specifically on ubuntu

    ja

    22 Jan 15 at 7:23 pm

  10. Ja? I don’t really do much on Ubuntu because the client to server differ so much. However, I do have notes for installing MySQL on Fedora. Let me know if they help you?

    michaelmclaughlin

    26 Jan 15 at 2:43 am

  11. I am really confused. Do we need version 5.1 or the latest one because I can’t find 5.1 at the link specified.

    Will Johnson

    21 Apr 16 at 8:10 pm

  12. No, those are old pages. Everything is now part of the self-contained image.

    michaelmclaughlin

    29 Apr 16 at 1:57 am

Leave a Reply