If you are a Magento 2 store admin, you know the importance of strong passwords! It helps prevent unauthorized access to the admin panel.
Security experts recommend using strong unique passwords, however, it is the least followed recommendation because unless you know the trick, it is impossible to remember it.
That does not mean you make the unauthorized access easier in Magento 2 admin panel. Go on with a strong and unique password. In case you forget it, I have your back 😃
You can follow any of the below methods to reset Magento 2 admin password when you forget it!
Methods to Reset Magento 2 Admin Password:
Method 1. Reset the Magento 2 admin password via the command line
Run the below command:
php bin/magento admin:user:create --admin-user=admin --admin-password=admin123
Enter email, first name, and last name

The above command is for creating a new user but you can also use it to reset the admin password in Magento 2 if the user is already available.
Method 2. Reset Magento 2 admin password via Email
- Change Magento 2 admin password using the default recovery system.
- Go to “Admin Panel”
- Click “Forgot Password”
- Enter the Email address and click the “Retrieve password” button.
- Easily set new password with the reset password link received in the Email.This method is useful when you have forgotten the password and want to reset it.
Method 3. Reset Magento 2 admin password from Account Settings:
- Login to admin panel
- Go to Account Settings as shown in the figure.
- Enter the new password
- Enter it again to confirm the change in password.
- Enter your old password to confirm your identity.
- Save Accounts.This method is useful when you remember the old password and simply want to reset it.

method is useful when you remember the old password and simply want to reset it.
Method 4. Reset Magento 2 admin password via phpMyAdmin
- Go to phpMyAdmin
- Go to the Database section and search for the admin_user table
- Run the below query as shown in the figure:
UPDATE admin_user SET password = SHA2('NewPassword', 256) WHERE username='admin';

That was all about changing the Magento 2 admin password.
Thank you.