Multiple MySQL installations

This article explains how to configure and run multiple MySQL installations under Microsoft Windows.

I’ve now MySQL 5.0.37 and MySQL 5.2.3-falcon-alpha set up on my PC. I could easily add more versions but for my testing purposes this does the job. The installation procedure is explained in detail in my post about how to install MySQL5 on Windows.

NOTE! During set-up the installer asks you if you would like to Install As Windows Service, and in case you are planning multiple installations you should provide a unique name for each service corresponding to the version number. My default service (MySQL 5.0.37) is named “MySQL5” and my test installation (MySQL 5.2.3) is named “MySQL52” – you get the picture. For any installation that you don’t want Windows to initiate during start-up, uncheck the “Launch the MySQL Server automatically”.

Windows services manager

By running the services manager in Windows, which is found under “Control Panel –> Administrative Tools –> Services” you can easily switch between your different MySQL installations. By default I’ve set up the current stable release (version 5.0.37 as I write) to fire up automatically when Windows boots. Version 5.2.3 is set to “Manual”. You can edit this as you please off course.

To edit the settings in “Services” simply right-click on the service and choose “Properties“. A new window will pop-up and allow you to set the various options for each individual service including start-up options and actions to take if the service should fail.

Basically, all you need to do in order to test your “local websites” against different MySQL versions is open up the services manager. Find the running MySQL service, stop it and start another MySQL service you want to test against.

What version you are running before you switch of or get switched off (whatever comes first) has nothing to say, when you start up again your default MySQL service is initiated and you are back to normal.

3 thoughts on “Multiple MySQL installations

  1. Hi,

    you can run the different mysqld servers on different ports. That way you just have to adjust your port number in your web application to test different mysql versions. No need to stop and start mysql.

    Cheers, Hakan

  2. Even though starting and stopping services isn’t that hard, it’s nice to know you have alternatives! Thanks for filling us in Hakan 🙂

    Cheers, Thomas

  3. Jorge Perez 03/05/2008 at 06:14 -

    Hakan’s solution has an advantage, specially if you are using multiple versions of MySql on a production server, where you can’t stop a service. It was great to find this site, Thanks Guys !!