You can reset your Magento administrative password directly through the database related to your website application. You can access the database through cPanel -> phpMyAdmin tool.
Once you have opened the phpMyAdmin tool choose the corresponding database* from the dropdown menu on the left side. After that click on the SQL tab in order to be able to execute the following MySQL query:
UPDATE `admin_user` SET `password` = MD5('NEWPASSWORD') WHERE `username` = 'ADMINUSERNAME';
admin_user – this is database table from the Magento database. Bear in mind that this table may have a prefix such as “mg_” or different one. You will see the prefix of the database once you access the phpMyAdmin tool and select the database. The database tables will be listed and you will see if there is a database prefix or not. If there is a prefix you should replace the admin_user name with the correct database table name, i.e. mg_admin_user.
NEWPASSWORD – the desired password which you want to be set.
ADMINUSERNAME – your Magento administrative username, i.e. admin.
Execute the query and your new password will be set.
*If you are not sure exactly which database is related to your website you can find its name inside the following file:
You can open the file through cPanel -> File manager and search for the following line:
where user_magedatabase is the name of the database.