Comment on Selfhosting Sunday! What's up?
tofu@lemmy.nocturnal.garden 1 week agoInteresting using systemd for that, I’d probably have chosen containers for that.
What’s the reason for replication vs. dumps? Does the client failover to the replica?
tburkhol@lemmy.world 1 week ago
I’m not a systemd guru, but it turned out pretty easy. dev.mysql.com/doc/refman/…/using-systemd.html#sys… Basically just make
[mysqld@copy]sections in my.cnf thensystemd start mysqld@copyand systemd is smart enough to passcopyinto mysql.I did it slightly different, using
systemctl edit mysql@.serviceto define different default files for each instance, then[mysqld@copy]sections in each of those files. Seems like theportoption for each has to go in a[mysqld]section, but otherwise ok.Replication because I want to put some live data, read-only, on the VPS, exposed to the world while the ‘real’ database stays safely hidden in my intranet. SSH tunnel so the replica can talk to the real database.