You can change / reset your Magento administrator password directly through the database. Follow below steps for change / reset Magento admin password.
- Open you CPanel and click on PhpMyAdmin (All database will show using this)
- Select your Magento Database.
- If you don’t know which database is my Magento store, then open your file manager.
- Go to ROOT directory and open app folder
- Open etc directory from app folder
- Open local.eml file in your editor. You will see below code in this file
- Once you Click on your database run below query in sql.
- Query:
- UPDATE admin_user SET password=CONCAT(MD5(‘NEWPASSWORD’), ‘:sG’) WHERE username=’AdminUsername’;
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[ROOT NAME]]></username>
<password><![CDATA[DATABASE PASSWORD]]></password>
<dbname><![CDATA[DATABASE NAME]]></dbname>
<initStatements><![CDATA[SET NAMES utf8]]></initStatements>
<model><![CDATA[mysql4]]></model>
<type><![CDATA[pdo_mysql]]></type>
<pdoType><![CDATA[]]></pdoType>
<active>1</active>
</connection>
Note:
- Before changing anything on live database please take a database backup in your local server and then after change it.
- You change NEWPASSWORD in the MD5(‘NEWPASSWORD’) with your new password, and change *AdminUsername* to your Magento admin username.