Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBZ-8655 Turn on replication during db initialization #425

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/mysql-replication/master/2.7/inventory.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# However, this grant is equivalent to specifying *any* hosts, which makes this easier since the docker host
# is not easily known to the Docker container. But don't do this in production.
#

# Oracle Docker image turn replication off while loading initial files, which breaks our replication setup.
# See https://github.com/mysql/mysql-docker/blob/1.2.20-server/mysql-server/8.4/docker-entrypoint.sh#L109
# Turn replication on in the init script.
SET @@SESSION.SQL_LOG_BIN=1;

CREATE USER 'replicator' IDENTIFIED BY 'replpass';
CREATE USER 'debezium' IDENTIFIED BY 'dbz';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'replicator';
Expand Down
6 changes: 6 additions & 0 deletions examples/mysql-replication/master/3.0/inventory.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# However, this grant is equivalent to specifying *any* hosts, which makes this easier since the docker host
# is not easily known to the Docker container. But don't do this in production.
#

# Oracle Docker image turn replication off while loading initial files, which breaks our replication setup.
# See https://github.com/mysql/mysql-docker/blob/1.2.20-server/mysql-server/8.4/docker-entrypoint.sh#L109
# Turn replication on in the init script.
SET @@SESSION.SQL_LOG_BIN=1;

CREATE USER 'replicator' IDENTIFIED BY 'replpass';
CREATE USER 'debezium' IDENTIFIED BY 'dbz';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'replicator';
Expand Down
6 changes: 6 additions & 0 deletions examples/mysql-replication/master/3.1/inventory.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# However, this grant is equivalent to specifying *any* hosts, which makes this easier since the docker host
# is not easily known to the Docker container. But don't do this in production.
#

# Oracle Docker image turn replication off while loading initial files, which breaks our replication setup.
# See https://github.com/mysql/mysql-docker/blob/1.2.20-server/mysql-server/8.4/docker-entrypoint.sh#L109
# Turn replication on in the init script.
SET @@SESSION.SQL_LOG_BIN=1;

CREATE USER 'replicator' IDENTIFIED BY 'replpass';
CREATE USER 'debezium' IDENTIFIED BY 'dbz';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'replicator';
Expand Down