title: MySQL Replication - How to avoid hard coding MASTER_PASSWORD when achieving Replication setup via automated script?
body: <p>In many other places, I am achieving it via following command:</p>
  
  <pre><code>mysql --defaults-group-suffix=xxxx -e "SHOW VARIABLES LIKE '%version%';
  </code></pre>
  
  <p>The actual password is in my.cnf.d/my_custom.cnf but how do I achieve something similar for setting up MASTER command (below):</p>
  
  <pre><code>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;"
  </code></pre>