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.:
/etc/percona-57-one.cnf
/etc/percona-57-two.cnf
/etc/percona-80-one.cnf
/etc/percona-80-two.cnf
while in /etc/systemd/system:
mysql-57-one.service
mysql-57-two.service
mysql-80-one.service
mysql-80-two.service
where all binaries, datadirs, pid, logfiles are set to different values based on which instance is run.
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.
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.
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).