How to install and start multiple MySQL instances on Windows 2012

The mistake I was doing was to copy whole MySQL installation folder. You don't need to copy this folder.

  • Simply create a new ini file for each instance that you want to run (examples given above) at any location for e.g. C:\MyInstances\my1.ini.
  • Then create a new folder for e.g. data1 in C:\MyInstances\data1 and copy mysql and information_schema databases in it. You will get these databases from data folder where MySQL is installed. On Windows 2012 (and probably other server OS) it typically is C:\ProgramData\MySQL
  • Then define the following in your ini file.

datadir=C:/MyInstances/data1

  1. Then run following command which will install MySQL as service. After services is created simply run the service.

MySqlpath\bin\mysqld --install mysqld1 --defaults-file=PATH_TO_YOUR_INI_FILE

Of course in each ini file, you have to define a different port number as mentioned by @Anthony Fornito.


I believe you were trying to run them on the same port.

Changed the ports numbers to be different was what made it work