Google+

Pages

Wednesday, May 28, 2014

How to reset admin password in Magento

If you have forgot your admin login password in Magento, there is an easy way to reset it.
Let's first find all users in 'admin_user' table.To do so, either you can view 'admin_user' table contents or fire below query:

SELECT * FROM admin_user;

Now to change password, you need to fire below query:

UPDATE `admin_user` SET `password` = CONCAT(MD5('qXpassword'), ':qX') WHERE `username` = 'USERNAME';

where 'qX' is salt value for encryption and it can be any other string and 
'USERNAME' is the desired user name for which you want to reset password.

For example:

user name is 'admin' for which you want to reset password.

Suppose after reset you want to set password 123456 and salt value you like is 'mK', 
then query to be fired will be:

UPDATE admin_user SET password=CONCAT(MD5('mK123456'), ':mK') WHERE username='admin';

Hope it will help. :)

No comments: