In many other places, I am achieving it via following command:
mysql --defaults-group-suffix=xxxx -e "SHOW VARIABLES LIKE '%version%';
The actual password is in my.cnf.d/my_custom.cnf but how do I achieve something similar for setting up MASTER command (below):
mysql --defaults-group-suffix=xxxx -Bse "STOP SLAVE;CHANGE MASTER TO MASTER_HOST='$MASTER_IP',MASTER_PASSWORD='HARD_CODED_PASSWORD',MASTER_USER='replicator', MASTER_LOG_FILE='$MASTER_LOG_FILE',MASTER_LOG_POS=$MASTER_LOG_POS;START SLAVE;"