MySQL 8.0 Reference Manual Including MySQL NDB Cluster 8.0 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, “Starting MySQL as a 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.5.9 and C:\mysql-8.0.22, respectively. (This might be the case if you are running 5.5.9 as your production server, but also want to conduct tests using 8.0.22.)

To install MySQL as a Windows service, use the --install or --install-manual option. For information about these options, see Section, “Starting MySQL as a 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 SC DELETE mysqld_service_name for each one. Alternatively, 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 when using mysqld --remove.