How To Reset Admin Password in Magento

How To Reset Admin Password in Magento

January 20, 2017 As an ecommerce website developer or magento website developer, sometime we  get the a situation when we forget the magento website admin access detail. To reset the password of any magento website is very simple. We just need to run a sql query. First you need to verify the database name. You can find out the database access detail from below file: Magento Installation Directory/app/etc/local.xml Open the file in any editor and you will get the following code
Now you can access the database through phpmyadmin. Once you select the database, you just need to open sql tab and run the query: phpmyadmin sql tab

For Magento 1.9 and older

UPDATE admin_user SET password = CONCAT(MD5('mypassword'), ':xx') WHERE username = 'ADMINUSERNAME';

For Magento 2:

UPDATE admin_user SET password = CONCAT(SHA2('mypassword', 256), ':xxxxxxxx:1') WHERE username = 'ADMINUSERNAME';
*Note: You need to replace following: mypassword = with your password ADMINUSERNAME : your admin user name xx or xxxxxxxx : any random string with same length. Once you will finish above execution, you will be able to login magento admin with new password. Thanks

Related Posts

from my blog

How to show all attribute after layered navigation filter in Magento

April 10, 2015

Magento Layered Navigation is really good for filter the product but problem is that, if we select any attribute like color or price all other attribute hide which are not...

How to fix layered navigation filer URL in Magento?

April 2, 2015

Magento is really good eCommerce CMS in terms of functionality. Layered Navigation is really good feature of Magento to filter the product in frontend side. Only problem with the layered navigation filter...

Must Have Anti-Spam and Security WordPress Plugins

March 30, 2015

WordPress, is a hugely popular open source community platform which is also referred as a CMS. It's user friendly CMS that makes it very flexible and allows users to make...