It is not safe to give password in the command. You should never let your password visible to others.
mysqldump -uusername -p -hmysql.domain.com [color=#CC0000]--opt[/color] dbname > dbnameDB.sql
Press enter and key in your password after the prompt. It is safer this way
$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] [url=http://dreamhost.com/r.cgi?296804/signup|DH3]Sign Up NOW[/url] or More Codes Here