So, you forgot the admin username or password of your Joomla! installation, the developer working on the site changed the information and is no longer communicating with you, or your site got hacked. Regardless, there are ways to resolve this.
If you know and have access to the email address associated with the administrator account, you can
recover the username via email by going to this URL:
http://www.mysite.com/index.php?opti...er&view=remind.
If you know and have access to the email address associated with the administrator account, you can
reset (passwords can never be recovered for security reasons) the password via email by going to this URL:
http://www.mysite.com/sitename/index...ser&view=reset.
If you do not know or have access to the email address associated with the administrator account, you will need to access the database using a tool such as phpMyAdmin or MySQL Query Browser. If even the thought of editing your database concerns you, you should involve someone you trust, or hire a professional to handle this part.
The password is stored in the MySQL database 'password' FIELD of the 'xxx_users' TABLE. Using a MySQL utility, open the table, find your admin username (if your site was hacked, this has most likely been changed), then select that row for editing. The password you enter MUST BE HASHED; you cannot simply enter text into this field.
Here are a few hashed passwords you can use to quickly make this change:
To set the password to "admin", enter the value "21232f297a57a5a743894a0e4a801fc3" into the 'password' field.
To set the password to "secret", enter the value "5ebe2294ecd0e0f08eab7690d2a6ee69" into the 'password' field.
To set the password to "OU812", enter the value "7441de5382cf4fecbaa9a8c538e76783" into the 'password' field.
In all cases, do not include the quotes. IMMEDIATELY after storing the new value in the database, log-in using the new password and CHANGE IT TO SOMETHING MORE SECURE.