Resetting MySQL Password
On Debian or Ubuntu you can also do this on the command line to login as the administrator:

sudo mysql --defaults-file=/etc/mysql/debian.cnf


Then you reset the password as randy has indicated.