How to install two different versions of MySQL server on the same PC
MySQL is the world's most popular open source Relational Database Management System (RDBMS).
A computer can run more than one instance of MySQL server with different versions. This article provides a step-by-step server configuration
guide for MySQL 4.1 (release 4.1.18) on Windows as a development box when there is already
another instance of different version of MySQL server installed.
What you need
A previous version of MySQL server has already been installed and is running. Here we assume MySQL 4.0.25 was installed already.
You should have installed MySQL 4.1 release 4.1.18 (other releases for version 4.1 should be fine).
If not, see How to install MySQL 4.1 on Windows.
Windows 2000 or XP (may work on Windows 9x but never tested).
MySQL Server Configuration Steps
Start MySQL Server Instance Configuration Wizard.
If you have selected the checkbox 'Configure the MySQL Server now' in the last step when installing MySQL 4.1, the configuration wizard should
start automatically when you click [Finish] button. Alternatively, you can launch the wizard from Start menu. Start -> Programs -> MySQL -> MySQL Server 4.1 -> MySQL Server Instance Config Wizard.
Select Detailed Configuration and click [Next].
Select Developer Machine and click [Next].
Select Transactional Database Only (this option optimizes InnoDB tables to enforce data and referential integrity). Click [Next].
InnoDB Tablespace Settings. We are installing on a developer machine. So the default setting can be left as is. Click [Next].
Choose Online Transactional Processing (OLTP) and click [Next].
Select TCP/IP port 3307 because 3306 is the default and has been used by your previous installation of MySQL. This will
allow two instances of MySQL server to be accessed via different ports on the same box. If you select 3306, the wizard will prompt that the port 3306 is
already in use.
Choose the Standard Character Set (this is the default character set).
Install MySQL server as a Windows service. Select the Service Name MySQL41 from the drop-down box to match with the MySQL version you
are installing. By default, the Service Name 'MySQL' has already been used by your previous installation of MySQL. You can also
check 'Include Bin Directory in Windows PATH' if you want to operate MySQL from command line.
Set a new password to root account. When MySQL was installed, the password for root account was blank. Now it is time to set a new password to it. Don't select the Create An Anonymous Account checkbox. This can lead to an insecure system.
Now everything is ready to execute. Click [Execute] button to run it.
The configuration file has been created successfully. Click [Finish] to close the wizard.
Errors you may receive
If you re-install MySQL 4.1 and your previous installation directory has not been deleted, you will receive the following error when
you have pressed [Execute] button (see screenshot above). In this case, just click Skip and the configuration will continue to execute.
When finishes, it will show that the security settings could not be applied (Error Number 1045 - Access denied for user 'root'@'localhost' (using password: NO).
You should click [Cancel] and then re-run the Configuration Wizard from the Start menu.
Start -> Programs -> MySQL -> MySQL Server 4.1 -> MySQL Server Instance Config Wizard.
Now you can install multiple versions of MySQL server on the same computer. For information about how to access them from
either SQLyog or PHP, read this article.
Other Recent Articles from the WAMP & LAMP category: