Skip to content

Commit

Permalink
Merge pull request #7 from michel-silva/fix-position-unlock
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Silva <[email protected]>
  • Loading branch information
michel-silva committed Feb 7, 2024
1 parent f9e9191 commit 475de9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ mysql_exec_initial_dump() {

info "Finish dump databases"

info "UNLOCK MASTER DATABASES FOR WRITE OPERATIONS..."
mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'UNLOCK TABLES;'

info "Start import dump databases"
mysql_execute < $FILE_LOCATION
info "Finish import dump databases"
Expand All @@ -223,9 +226,6 @@ EOF
info "Remove dump file"
rm -f $FILE_LOCATION

info "UNLOCK MASTER DATABASES FOR WRITE OPERATIONS..."
mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'UNLOCK TABLES;'

info "Finish dump process databases"

info "MySQL dump master data finish..."
Expand Down
2 changes: 1 addition & 1 deletion bitnami/mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ The above command scales up the number of slaves to `3`. You can scale down in t

If your master database missing some binary files, the replication will broken. It's possible add `MYSQL_REPLICATION_SLAVE_DUMP=true` toe make a dump on master and import it on slave.

> **Note**: It's most important that master database is only used by this process until the end to avoid missing data.
> **Note**: The master database must be only used by this process until the end to avoid missing data.

### Configuration file

Expand Down

0 comments on commit 475de9f

Please sign in to comment.