2022-11-04 17:14:41
This commit is contained in:
@@ -109,7 +109,6 @@ echo -e "\treplication user = $MASTER_USER"
|
||||
echo -e "\treplication password = $([[ $MASTER_PASSWORD ]] && echo true || echo false )"
|
||||
echo -e "\n"
|
||||
|
||||
|
||||
if [[ -f "$CFG" ]]; then
|
||||
if [[ ! $(grep user $CFG) ]]; then
|
||||
echo "ERROR: 'user' field not found in '$CFG'"
|
||||
@@ -183,7 +182,7 @@ for FILE in $NEWPATH*.gz; do
|
||||
done
|
||||
|
||||
if [[ MASTER_HOST && MASTER_USER && MASTER_PASSWORD ]]; then
|
||||
echo "applying configuration for replication from $MASTER_HOST"
|
||||
echo "applying configuration for replication\n\thost: $MASTER_HOST\n\tuser: $MASTER_USER"
|
||||
$CMD mysql -e "CHANGE MASTER TO master_host='$MASTER_HOST',master_user='$MASTER_USER',master_password='$MASTER_PASSWORD';"
|
||||
else
|
||||
echo "replication credentials not configured"
|
||||
|
||||
Reference in New Issue
Block a user