To change a magento admin password, run the following query on the magento database.
Replace ‘password’ with your desired password.
Replace ‘admin’ with the username you wish to reset.
The Letters ‘qX’ can be replaced with another two letters if desired, or you can leave them as is.
UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';
For Example, if we want to change username GMG’s password to ‘candycane’, this is the query we should run
UPDATE admin_user SET password=CONCAT(MD5('qXcandycane'), ':qX') WHERE username='GMG';