switch



Locked out of your Magento store? How to reset your login from phpmyadmin.

August 5, 2008 at 1:04 pm, Category: Uncategorized, Web Hosting, by Tom

Everyone loses their keys at some point in their life, and not being able to login to your Magento e-commerce store is just like losing your keys to you’re shop (especially if for some reason the email reminders are not getting through to you)! I recently discovered how to reset your Magento admin/user passwords through phpmyadmin, so thought I’d share it for anyone who is locked out of their store.


1. Open phpmyadmin for your Magento database then click on the database name followed by the sql tab that appears at the top of the screen then run the following command:

SELECT * FROM admin_user;

and click ‘go’

2. Find the username you want to reset the password for then press the ‘sql’ tab above and input the following code:

UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';

Now before clicking ‘Go’ to submit the sql  change the ‘password’ part of  ‘qXpassword’ to what you would like your password to be then submit it.

For Magento versions older than 1.4.1

For older versions of Magento, follow the guide as normal, but use this code in the ‘sql’ tab to update the password:

UPDATE admin_user SET password=MD5('yournewpassword') WHERE username='yourusername';

and click ‘go’

After completing these steps you should be able to login again and update your settings appropriately in the Magento admin interface. I hope this might be helpful to anyone in a jam with their Magento store!

  • RD

    For some reason this is not working for me.

  • RD

    This alone will not work if localhost is the host name.

    What I discovered was the problem in my case was accessing the site from localhost. I read about it here:

    http://www.nickbartlett.com/wordpress/magento-cannot-log-into-admin/

    You either have to add an entry to your hosts file, or access your local machine through a dynamic dns service. Both worked for me. To my hosts file, I just added:

    127.0.0.1 http://www.localhost.loc

    then used http://www.localhost.loc as the hostname of course.

    Kurzweil4

  • http://www.scalesmart.com Andrew Clarke

    If you have forgotten your password you can use this tool http://md5encryption.com/ to encrypt a new one and enter it into the user you wish to change through phpmyadmin

    I used it and it worked fine as the above failed for me.

  • Kevin

    I went into PHPadmin and just pasted my new hashed password in after using an MD5 hash generator I found on the web. Worked.

  • PAJ

    agreed, MD5 hash needed, insert as plain text in phpadmin and ensure not using intranet address, netbios name or localhost to connect to magento and login.

  • http://www.wholesalethreads.com.au Jane

    This worked for me! Cheers!

  • Hendy

    Thanks a lot, it works for me :D

  • Anonymous

    I just cannot believe that this situation is possible :) )) I have mag. on a local machine, pressed “Retrieve password” and after that… I was locked outside the “house”… :) )) Many thanks, your solution worked great !

  • glenn

    Ok I am stupid but where do I access phpadmin

  • NuBlue

    Hi Glenn

    The location of phpMyAdmin depends on how your hosting is setup up. Some hosts allow you to use it externally, some require you to use it through their control panel. 

    We’re one of the latter by default; a client on our Shared Hosting, for instance, would log in to their Hosting Control Panel; click on Home (top left); click on their domain name; click on Databases; click on the name of the database they want to work on; then click on DB Web Admin. This would start an instance of phpMyAdmin (in a popup window, so they might need their browser to allow popups for the control panel URL). 

    Hope that helps!

  • jak

    brilliant! Thanks!

  • lajos

    it is not brilliant and it is outdated since magento 1.41…

  • NuBlue

    Hi Lajos
    See updated post above. Hope this helps :)

  • flobo

    that saved my day Thanks!

Our Client Line Up

Terms and Policies: Privacy Policy | Terms and Conditions | Environmental Policy | Equal Opportunities Policy | Sitemap
© NuFuture Ltd 2005-2010. Company No: 05523340  |  VAT No: 865 6930 80  |  InfoLab21, Lancaster, Lancashire, UK