Try the following command:
mysqladmin -h[hostname/localhost] -u[username] -p[password] drop [database]
In general, you can pass any query to mysql from shell with -e option.
mysql
mysql -u username -p -D dbname -e "DROP DATABASE dbname"
If you are tired of typing your password, create a (chmod 600) file ~/.my.cnf, and put in it:
~/.my.cnf
[client]user = "you"password = "your-password"
For the sake of conversation:
echo 'DROP DATABASE foo;' | mysql