Sometimes you forget your Magento Admin password and you don’t know how to reset or recover it? This magento tutorial will guide you step by step how to set a new password for your Admin account using phpMyAdmin.
Step 1: Access phpMyAdmin tool
If you are using Cpanel, you can access phpMyAdmin in Database section
In case you’re not using Cpanel, you can access phpMyAdmin directly from your domain, just follow these steps:
– Download latest compatible phpMyadmin version at:Â https://www.phpmyadmin.net/downloads/
– Next, access phpMyAdmin directly from this url: youdomain.com/phpmyadmin/
Note:(sometimes you cannot access phpmyadmin due to htaccess file, just temporarily rename/remove the file to access phpmyadmin)
– Now login using Cpanel account info or any mysql user you created.
Step 2: Access database
Now select the database of your site on the left side
Step 3: Create new admin account for Magento site
After that, click on the SQL tab in and execute the following MySQL query:
1 | UPDATE `admin_user` SET `password` = MD5('NEWPASSWORD') WHERE `username` = 'ADMINUSERNAME'; |
Change the following variables:
admin_user – this is database table from the Magento database. Check if this table have a prefix , such as “bk_“, you need to replace the admin_user name with the correct database table name, i.e. bk_admin_user.
NEWPASSWORD – the new password which you want to set.
ADMINUSERNAME – Magento admin username, i.e. admin.
Click on Go button to run the query and your new admin account will be set.
*if you see many databases in phpMyadmin and not sure which one is being used on your site, open the following file:
~/app/etc/local.xml
And search for the following line:
1 | <dbname><![CDATA[user_magedatabase]]></dbname> |
user_magedatabase is the name of the database of your Magento site
Everything is done, now just login with the newly created admin account.
If you have any questions or problems just feel free to drop a line here on Magento explorer comment section. I’m grateful to help you out.
2 Comments
Hi
My magento site has been hacked and i am unable to get access to the cpanel
I have read the post on how to reset the passsworkd using phpmyadmin but i am still confused
please can you help
Hello ASAM,
What step are you confusing at? First you need to login to PHPmyadmin of your hosting. Then follow the step in the article to run the query in the article.
Replace username & password as you want.
Let me know if you need any help