To allow you to log in to MySQL without having to type a password at the prompt, add your password to a file called .my.cnf in your home directory.
[client] user=the_user password=the_pass
Important: Make sure the file is readable only to you, by changing its permissions to r-------- (400) or rw------- (600):
chmod 600 .my.cnf
References
MySQL :: MySQL 6.0 Reference Manual :: 5.5.6 Keeping Your Password Secure