That's if you forgot password. Easier iffin you know password...
To change password, log onto server as user whose password you wish to change. Implies one knows username/password, this is actually a security thingy.
run mysqladmin.
use 'password' command:
password new_password
This can be accomplished through SQL also, using SET command:
SET PASSWORD [FOR user] = PASSWORD("password");