I am not certain of your meaning, but it is probably one of these:
1. The system user "mysql" login password - normally the mysql user will not have a login shell or password, it exists only to run the mysql server and to own the database directory tree. If you had set a password for this user you cannot recover it, but the root user can reset it.
2. The system mysql user mysql server password - again, the mysql user normally does not have a mysql server password. If you had set one with a GRANT statement, another user with GRANT privs may be able to reset it, but not recover it.
3. If you mean a normal user's mysql server password - Again, not recoverable, but can be reset by another user with GRANT privs.
In all cases the passwords are stored only as non-reversible hashes, so a user with adequate permission can change the passwords but not recover them.
For shell passwords, the root user may do this with the passwd command (see man page).
For mysql accounts, you may use a REVOKE/GRANT statement to set a new GRANT, including new password, or you can directly update the mysql.user table similar to this:
mysql> UPDATE mysql.user SET Password=PASSWORD('NewPassWord') WHERE User='username';
UPDATE: As you have updated the question while I was typing, to exclude resetting but only recover it, I will update my answer here as well...
As far as I know, you cannot recover them (i.e. reverse the hash). They are stored as one-way hashes so you can only reset, not recover.