5.3.2.2 Starting Multiple MySQL Instances as Windows Services

On Windows, a MySQL server can run as a Windows service. The procedures for installing, controlling, and removing a single MySQL service are described in Section 2.3.6.7, “Starting MySQL Server as a Microsoft Windows Service”.

To set up multiple MySQL services, you must make sure that each instance uses a different service name in addition to the other parameters that must be unique per instance.

For the following instructions, suppose that you want to run the mysqld server from two different versions of MySQL that are installed at C:\mysql-5.0.92 and C:\mysql-5.1.73, respectively. (This might be the case if you are running 5.0.92 as your production server, but also want to conduct tests using 5.1.73.)

To install MySQL as a Windows service, use the --install or --install-manual option. For information about these options, see Section 2.3.6.7, “Starting MySQL Server as a Microsoft Windows Service”.

Based on the preceding information, you have several ways to set up multiple services. The following instructions describe some examples. Before trying any of them, shut down and remove any existing MySQL services.

To remove multiple services, use mysqld --remove for each one, specifying a service name following the --remove option. If the service name is the default (MySQL), you can omit it.