Multiple instances


we are considering to setup multiple instances of percona 5.7 and 8.0 (from binary) little bit different than “recommended” way in tutorials.

Is it “ok” to run multiple instances with systemd with separate mysql config files for e.g.:

while in /etc/systemd/system:

where all binaries, datadirs, pid, logfiles are set to different values based on which instance is run.

Or would this setup “break” something?

1 Like

This setup should work.
The only cation I would have, is that you need be careful and when you do shutdown or backup operation you make sure you do this on the correct instance.

1 Like

Hi @rokj This is a perfect use-case for something like Docker or LXC. Each container runs inside its own process space, and stores data inside its own volume. Each container has a unique IP and they all use the same paths for the config files. docker stop/start will do safe starts and shutdowns for the mysql as well. Running a docker implementation would be far easier to manage, IMO, than the multi-config/multi-datadir you have shown.

1 Like

Thank you both for answers.

Yes I am considering using LXC or Docker also… however I am little hesitant since it would bring another layer of complexity (another software to be aware of or watch).

1 Like

MySQL :: MySQL 8.0 Reference Manual :: 4.3.4 mysqld_multi — Manage Multiple MySQL Servers might be useful for you as well