As per the issue #35432, hostname command is no longer available as mysql:5.7 is based on oracle.
For the command on line 27 to work, it is sufficient to use the $HOSTNAME variable which is set in the container,
for it to work effectively.
- Ignore 'xtrabackup_slave_info' if it is an empty file.
- Remove the tailing semicolon in 'xtrabackup_slave_info'.
- Stop script when 'CHANGE MASTER' is failed, then rename 'change_master_to.sql.in' only when changing master is successful.