Ouch. mysql isn't where I'd want to start.
In case you haven't worked your way through this already, here's what just worked for me.
Telnet (SSH, or whatever) to mysite.com
Login with the default dreamhost user/password
mysql -u -p -h mydatabase.mysite.com esapnc
You'll be prompted for the database user's password.
You'll find that mysql command line in the Dreamhost Goodies > MySQL page.
Hope that helps.