How to change admin password using database in Magento ?

Posted Leave a commentPosted in Magento Resources, Resources

Magento 1.9 and older ::
The following statement into the SQL query text box. Replace NewPassword with the new password, and replace both occurrences of xx with any random two-character sequence:
UPDATE admin_user SET password = CONCAT(MD5(‘xxNewPassword’), ‘:xx’) WHERE username = ‘admin’;
Note::
This command assumes that you want to change the password for the admin user account. To change the password for another account, change the username field to the correct value.
The xx two-character sequence is a cryptographic salt. It can be anything you want, but make sure you use the same value in both parts of the SQL statement.
Magento 2 ::
The following statement into the SQL query text box. Replace NewPassword with the new password, and replace both occurrences of xxxxxxxx with any random character sequence:
UPDATE admin_user SET password = CONCAT(SHA2(‘xxxxxxxxNewPassword’, 256), ‘:xxxxxxxx:1’) WHERE username = ‘admin’;
Note::
This command assumes that you want to change the password for the admin user account. To change the password for another account, change the username field to the correct value.
The xxxxxxxx character sequence is a cryptographic salt. It can be anything you want (and any length you want), but make sure you use the same value in both parts of the SQL statement.

For More information you can visit below urls ::

https://www.a2hosting.in/kb/installable-applications/optimization-and-configuration/magento1/resetting-the-magento-administrator-password
https://www.siteground.com/kb/how_to_reset_admin_password_in_magento/