Conversion Magento admin password from the database
Below a very simple way to change your password to the Admin panel in the script Magento
Phpmyadmin log in to our database.
If you are not sure, database that is associated with your site, You can find her name in the database configuration file Magento:
Magento 1.9 and older:
1 | app/etc/local.xml |
Magento 2:
1 | app/etc/env.php |
You can open the configuration file using FTP and look line dbname, where you will find the database name.
Select the appropriate database from the drop-down menu on the left. Then click on the SQL tab, to be able to perform the following query MySQL. remember, that question will vary depending on your version of Magento:
Magento 1.9 and older:
1 | UPDATE U admin_user SET `password` = md5('YOUR_NEW_PASSWORD'), is_active = 1 WHERE `username` = 'YOUR_ADMIN_USERNAME'; |
Magento 2:
1 | UPDATE admin_user SET `password` = CONCAT(SHA2('xxxxxxxxYOUR_NEW_PASSWORD', 256), ':xxxxxxxx:1') WHERE `username` = 'YOUR_ADMIN_USERNAME'; |
make sure, You are replacing the following variables:
admin_user – This is a database table from the database Magento. remember, that this table can have a prefix such as “mg_” or other. After gaining access to the phpMyAdmin tool and selecting the database you see the Magento database prefix (if). If there is a prefix, should be replaced with a user name admin_user the correct name of the database table, for example,. mg_admin_user.
YOUR_NEW_PASSWORD – desired password, you want to set. A sequence of characters is a salt cryptographic xx..xx. It can be anything, what you need, but make sure, that you use the same value in both parts of a SQL statement.
YOUR_ADMIN_USERNAME – Your username administrative Magento, ie. Administrator.
xxxxxxxx – secret key generated for your Magento installation. The key can be obtained from the application configuration file listed at the beginning of this article.
Make inquiry, and your new password will be set Magento.