Forgot Joomla admin password

Open the database using phpMyAdmin or database explorer and select the table, jos_users . (replace jos_ with your own table prefix if this is different than the default).

Run the following SQL Code:

INSERT INTO `jos_users`(`id`, `name`, `username`, `email`, `password`, `usertype`, `block`, `sendEmail`,`registerDate`, `lastvisitDate`,`activation`,`params`)

VALUES ('40', 'Administrator2', 'admin2', ' your-email@yourdomain.comThis e-mail address is being protected from spam bots, you need JavaScript enabled to view it ','d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199','Super Administrator', 0, 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00',"","");

INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`) VALUES (40, 8);

Logon to the back end http://yoursitedomain.com/administrator using the username admin2 and the password secret in the login box.

that how it works