When using MySQL, I always use a .my.cnf file to store my password so that I can switch to 'root' on the host, and execute whatever commands I need.
<presource lang="bash">file=~/.my.cnftouch $filechmod 600 $filecat <<EOF >> $file
[client]
user=root
password=SuperSecretSauce
EOF </presource>
== Backup Script ==