Admin Password Reset From Database

In this blog, we will see how we can edit/reset our lost magento admin password in few simple steps.

Step 1:

First of all open your phpmyadmin database of your website. it should look like this

phpmyadmin_db

Step 2:

admin_table

Then select the admin_user table from it . This table contains your admin account details as follows

Step 3:

Select the admin user record for which you want to change the login password and click to edit the record. This leads u to the edit window of the phpmyadmin record

edit_window

Step 4:

Now, as the password stored  in the magento are MD5 encrypted.So, first we need to encryt our password using MD5 encryption. For this we require two things

1) New Password -Any Password that you want to use.

2)Salt – any 2 letters word to make your password more secure.

I will choose “pass” as my New Password and “xy” as my Salt. Then use any of the MD5 generator site to generate the MD5 of the string “xypass”. In my case MD5 is “1028ff89cc8dae9372f21a3dd889b8c8”.

Now, In the password column, put in the md5:salt i.e in my case “1028ff89cc8dae9372f21a3dd889b8c8:xy” and then click “Go” to  save the changes.

This will change your admin password. Now you will be able to login with new password.

Always remember that you will use password alone as login password not password with the salt. In my case i will use “pass” as password not “xypass”.

Or simply go to the SQL menu of the admin_user table of your phpmyadmin database and execute the following query,

UPDATE admin_user SET password=CONCAT(MD5('YOUR_SALT+YOUR_PASSWORD'), ':YOUR_SALT') WHERE username='YOUR_USERNAME';