Have you checked if statement-based replication works from mysql to mariadb?
Comment on Selfhosting Sunday! What's up?
tburkhol@lemmy.world 5 months ago
I’ve been trying to convince a VPS to run two instances of mariadb - one for local databases, one to replicate the homelab. Got mariadb@server and mariadb@replica sorted out through systemd, but now stuck on replication from mysql to mariadb. Looks like I’ll be ripping out mariadb and putting everything on mysql.
RheumatoidArthritis@mander.xyz 5 months ago
tburkhol@lemmy.world 5 months ago
I’m hung up on unrecognized charset #255. Tried rolling everything back to utfmb3; suppose I could go all the way to Latin1. I imagine there’s a lot of depth I could learn, but dropping mariadb for mysql seems like the path of least resistance right now.
RheumatoidArthritis@mander.xyz 5 months ago
So it works now! Good job
tofu@lemmy.nocturnal.garden 5 months ago
Interesting 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 5 months 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.