In case you forgot or don't know the password of the Magento administration user:

  • Go to the administration link for your store
  • Click on Forgot your password
  • Enter your email address (the address associated with your account)
  • Click on Retrieve Password - you will receive an email at the specified address where you can reset the password

Magento 2

Reset password directly from database:

  • Log in to cPanel
  • Database section - click on phpMyAdmin
  • Locate the database used by Magento and then click on SQL
UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxNewpassword', 256), ':xxxxxxxx:1') WHERE username = 'admin';

In cazul in care folositi prefixe pentru tabele - ex rf:

UPDATE rf_admin_user SET password = CONCAT(SHA2('xxxxxxxxNewpassword, 256), ':xxxxxxxx:1') WHERE username = 'admin';
  • Replace Newpassword - with the desired password
  • xxxxxxxx - with a string (must be identical in both fields)
  • press the Go button

 

Using CLI

- Log in to the SSH console

- Navigate to the location where you installed Magento

Retrieve the admin user information from the database using the commands below:

echo "select email,firstname,lastname from admin_user where username='[admin]'" | mysql -u [db_user] [db_name] -p

a) Replace [db_user] - with the database user name
b) Replace [db_name] - with the database name
c) username = "[admin]" - replace [admin] with the name of the user you want to reset - You will need to enter the database user password

To reset the password use the command below replacing the fields with the desired ones:

php bin/magento  admin:user:create --admin-user="[admin]" --admin-password="[nouaparola]" --admin-email="[[email protected]]"  --admin-firstname="[Test]" --admin-lastname="[Test]

 

If you encounter problems in applying the above instructions please contact us. HostX offers the best Magento web hosting service and can assist you in solving your problems.

Cette réponse était-elle pertinente ? 0 Utilisateurs l'ont trouvée utile (0 Votes)