Replies: 4 comments 2 replies
-
Where are you replicating from? Where are you replicating to? What is your goal? You can certainly install your own docker-entrypoint.sh using a custom .ddev/db-build/Dockerfile.* - just change that (https://github.com/ddev/ddev/blob/master/containers/ddev-dbserver/files/docker-entrypoint.sh#L143) |
Beta Was this translation helpful? Give feedback.
-
I've got a private tailscale network, I do development on my laptop which is running my project in ddev, I'm trying to configure this as the master by adding a .ddev/mysql/replication.cnf as follows: [mariadb] I've got a remote server with the same ddev project, following a similiar configuration, when I try setting server_id=2, it doesn't take it according to SHOW VARIABLES LIKE 'server_id'; MariaDB [db]> SHOW VARIABLES LIKE 'server_id'; My servers .ddev/mysql/replication.cnf is as follows: [mariadb] When I do a SHOW SLAVE STATUS; its reporting: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). |
Beta Was this translation helpful? Give feedback.
-
Can you clarify where/how exactly I would put the new docker-entrypoint.sh? I'm looking at https://github.com/ddev/ddev/blob/master/containers/ddev-dbserver/Dockerfile as a reference, and doesn't look like there is anything there I need to override... https://github.com/ddev/ddev/blob/master/containers/ddev-dbserver/files/docker-entrypoint.sh is the file I'd need to customize, not sure whether I could change line 143 to exec mysqld to just let it read from my replication.cnf, or less preferable exec mysqld --server-id=2 Another oddity is that the line specifies exec mysqld --server-id=0 but the server_id is showing as 1?!?!?!!? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the tips, I actually read that and still didn't think it was possible to do what I'm trying to do |
Beta Was this translation helpful? Give feedback.
-
I'm attempting to setup mariadb replication, any reason why the server-id is being hardcoded in containers/ddev-dbserver/files/docker-entrypoint.sh:143? Is there a workaround or fix to allow me to change it? I've tried building a custom docker image but it looks like the dbimage/dbimage_default config flag is gone
Beta Was this translation helpful? Give feedback.
All reactions