For your version of the wwmysqldump script, you should change the second line to
(assuming that that is the correct home directory for wwadmin), then it should be able to dump the database without a password. The way you have it now, it will dump it to the screen. Once you have this working you can change the third line to
mysqldump --opt webwork > /home/wwadmin/downloads
(assuming /home/wwadmin/backups is where you want the backups to go).