If you don’t login regularly to your Joomla administrator site, you may one day forget what your password is. If this unfortunate event does happen, its very easy to recover it if you have access to the database that your web site uses.
Open your database and find the table prefix_users, where prefix is the database prefix that you selected when you installed Joomla.
Open your user account for editing.
In the password field, replace the contents with
You’ve just changed your password to the word secret. Now immediately login and change your password to something more secure.
This procedure works with Joomla 2.5 and 3.x.