2

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.)

RolandoMySQLDBA
  • 185,223
  • 33
  • 326
  • 536
Rick James
  • 80,479
  • 5
  • 52
  • 119

2 Answers2

4

Easy, with MariaDB.

mysql_install_db.exe --service=service_name --datadir=datadir --port=port

Run this multiple times with different parameters (service_name, datadir, port should b different for different instances). Start services with "net start " . This is supported official tool. Documentation is here https://mariadb.com/kb/en/mariadb/mysql_install_dbexe/ . You do not need any mysql_multi, really :)

2

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 !!!

RolandoMySQLDBA
  • 185,223
  • 33
  • 326
  • 536