cluster MySQL on railway

So, call me crazy but, I don’t want to use PlanetScale. I want to be 100% Railway, the total fanboy I am. This is for a good reason, the latency of talking to a database hosted on railway via private networking is much better. So, I want to make sure I’m building on a good foundation here. How can I make a database cluster, with master/slave replication. Reading the guide how to do this https://hevodata.com/learn/mysql-master-master-replication/#ss1 I need to edit the /etc/mysql/my.cnf I’m not sure how I can do this though, with the docker images provided only the environment variables are exposed.
Learn | Hevo
MySQL Master Master Replication: 4 Easy Steps | Hevo
MySQL Master-Master replication is a setup where two separate MySQL databases can talk to each other and share information in both directions.
Solution:
you'd build on top of it, pseudocode: ``` from mysql copy my.cnf /etc/mysql/my.cnf...
Jump to solution
7 Replies
Percy
Percy7mo ago
Project ID: dd3f96f7-3ab3-4453-86a3-32328b2f81d6
macwilko
macwilko7mo ago
dd3f96f7-3ab3-4453-86a3-32328b2f81d6
Brody
Brody7mo ago
you'd need to have a Dockerfile that copy's your modified config file into the image
macwilko
macwilko7mo ago
i see! so essentially I'll need to modify the mysql Dockerfile ?
Solution
Brody
Brody7mo ago
you'd build on top of it, pseudocode:
from mysql

copy my.cnf /etc/mysql/my.cnf
from mysql

copy my.cnf /etc/mysql/my.cnf
macwilko
macwilko7mo ago
ty salute
Brody
Brody7mo ago
no prob 🫡