It's really not so tough. Using Super User permissions we'll stop MySQL, start it again but skipping authority, change the password and restart as normal.
Here goes ..
Log into the terminal and, if you're using Ubuntu, type:-
.. or, for other Linux distros:-
Now stop the MySQL daemon, typing:-
And kick it back up, but minus authentication:-
Hit return again for a new prompt.
NB AS far as I know, some older MySQL versions use safe_mysqld rather than mysql_safe, so try both.
Now you can connect to MySQL:-
.. and add a new password. The old one won't be deleted.
Restart the MySQL daemon with regular authentication (if you don't, you leave your databases wide open to hacking), typing:-
And exit the root Super User account:-
.. and jump up and down a bit in a generally excited fashion.