How to Run Multiple MySQL Instances in Windows

installationmariadbMySQLvirtualisationwindows

Which is a better way to install multiple instances of MySQL / MariaDB / etc on a single Windows box?

  • Manually setting different ports?

  • Docker?

  • Virtual Box?

  • Something else? (Sandbox, mysql_multi, etc, seem to fail on Windows.)

Once they are installed, I intend to write a Perl script to iterate through the instances to get timings (etc) for comparison. So, they need to be accessible in some manner from a single thread.

(I can figure out the settings, RAM, disk, etc; it's just the installs that I am looking for advice on.)

Best Answer

Installs of MySQL for Windows is like drudgery but possible

I usually use the no-install zip file.

After installing it in an appropriate location, I go to the bin folder and run

mysqld --install

This creates the service called MySQL.

Please make sure the my.ini is in the parent directory of the bin folder.

Since you are installing different versions of MySQL, you may want to name the services to differentiate the services.

For MariaDB, you probably would do

mysqld --install MariaDB

and then the same for Percona Server and other versions of MySQL

Being the MySQL guy you are, I know you got the rest from here (just don't forget to assign different port numbers to each my.ini. Ah, you can iterate on port number since you mentioned it in your first bulletpoint)

HAVE FUN WITH IT !!!