Knowledge Base
MilesWeb / CMS FAQ

How to reset the password for Magento admin panel?

Approx. read time : 4 min

Generally, when you forget your password, using the Magento password recovery feature will help reset the password by e-mail. But, if this option isn’t available (for example, if e-mail on your site is not working properly), you can use phpMyAdmin for resetting the password manually in the database.

METHOD #1: E-MAIL

You can reset the Magento administrator password quickly and easily by requesting a new one via e-mail. For this, follow the below steps:
1. Browse for the Magento login page.
2. Click on forgot your password link.
3. You will be asked to enter the Email Address associate with the account. Type the e-mail address.
4. Click on Retrieve Password. A message will be sent by Magento to the e-mail address you have inserted in the previous step.
5. Click on the link to reset the administrator password sent in the email.

METHOD #2: PHPMYADMIN

It is also possible to modify the Magento administrator password directly in the database with phpMyAdmin. For this, below is the procedure as per your Magento version.

Magento 2

In Magento 2 database, you can follow the below steps to reset the administrator password directly:
1. Log in to cPanel.
2. In the cPanel home screen, go to the Databases section and click on phpMyAdmin.
3. Click the Magento database in the left-hand pane of phpMyAdmin. A list of tables in the database will get displayed.

Note: The Magento database is typically the username_mageXXX, where username means your cPanel username and XXX means a three-digit number.

4. Click SQL on the top menu bar.
5. A SQL query text box will appear where you will need to copy and paste the below statement. Replace NewPassword with the new password and replace both occurrences of xxxxxxxx with sequence of any random character:

UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxNewPassword', 256), ':xxxxxxxx:1') WHERE username = 'admin';

Note:

  • When you use this command, it is assumed that that you want to change the password for the admin user account. If you want to change the password for another account, you just need to change the username field to the correct value.
  • The xxxxxxxx character sequence is similar to cryptography. You can insert anything you want (the length doesn’t matter), but ensure you use the similar value in both parts of the SQL statement.
  • If table prefixes are used by your Magento installation, ensure that you are adding it to the table name. For example, if your Magento uses prefix mg_, you will need to type the following command:
    UPDATE mg_admin_user SET password = CONCAT(SHA2('xxxxxxxxNewPassword', 256), ':xxxxxxxx:1') WHERE username = 'admin';

6. Click on Go. With this the phpMyAdmin will update the database, and you can log in to Magento as the administrator with the new password.

Magento 1.9 and older versions

In order to reset the administrator password directly in Magento 1.9 and older versions, you will need to follow the below steps:
1. Log in to cPanel
2. Click on phpMyAdmin in the Databases section of the cPanel home screen.
3. In phpMyAdmin, click the Magento database in the left-hand pane. You will get a list of tables in the database.

Note: Here, the Magento database is username_mageXXX, where username indicates your cPanel username, and XXX indicates a three-digit number.

4. Click on SQL on the top menu bar.
5. In the SQL query text box, copy and paste the below statement. Replace NewPassword with your new password and replace both occurrences of xx with sequence of any random two-characters.

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

Note:

  • This command usage indicates that you want to change the password for the admin user account. For changing the password for another account, insert the correct value in the username field.
  • The xx two-character sequence is similar to cryptography. You can insert anything you want to but ensure that same value is used in both parts of the SQL statement.
  • In case, your Magento installation uses table prefixes, ensure that you add it into the table name. For example, if your Magento table prefix is mg_, you will type the below command:
    UPDATE mg_admin_user SET password = CONCAT(MD5('xxNewPassword'), ':xx') WHERE username = 'admin';

6. Click on Go. With this, the phpMyAdmin will update the database, and you can log in to Magento as the administrator with the new password.

So, this is the way you can reset the password for Magento admin panel.

Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.

Trusted By Thousands of Clients & Big Businesses

We highly appreciate the kind and stellar feedback we receive from our customers. Delivering the best is our goal! MilesWeb is rated Excellent out of 5 based on reviews. Read more reviews.

Excellent
Based on reviews
2 hours ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
4 hours ago
Milesweb is superb Hosting pro...
Milesweb is superb Hosting provider ever, their Support team is amazing!!!...
Abhishek Singh
15 hours ago
Great support in great timing...
We need urgent assistance on changes in a primary domain on our client's Cpanel accounts and reached...
Riyaju Deen
21 hours ago
Best Website Hosting platform ...
I was new on MilesWeb. And needed help on multiple areas from setting up to getting started with cre...
Harshada
1 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
1 days ago
the team is very supportive th...
the team is very supportive though at times effort needs to be made to make understand the problem s...
Suree Sharma
1 days ago
I am using miles web for 3plus...
I am using miles web for 3plus years, very quick and perfect support by the team, they helped me man...
Sri Raghav
2 days ago
The service is good...
The service is good. They are answering with patience and doing the needful as soon as possible....
MR
2 days ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
3 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
4 days ago
positively helped me with find...
positively helped me with finding insecure content on my website causing SSL to not work properly on...
Thaviraj Junglee
4 days ago
Exceptional support, Truly Pra...
I had opted for the basic wordpress hosting plan as I intended to experiment with various plug-ins. ...
Aseem Chandna