Updated on Mar 13, 2019
If you are not using an encryption program to save your passwords, you might end up forgetting it and being unable to access your admin area in Magento 2. Luckily you have 2 options in that situation.
The easier way to reset your password is by using the Forgot your password? feature located in the admin dashboard login screen.
Type your admin email address and click on the Retrieve Password button.
On your email address, you will receive a link with which you can create a new password for your account.
If for some reason, you have no access to the email address associated with your Admin account in Magento 2, you will have to edit the database manually in order to regain access. To do that, you will need to login to your cPanel and access the phpMyAdmin service.
Click on the database you use for your Magento 2, search for admin and access the admin_user table.
Click on the Edit button and then input your new admin email address in the email value field and the new admin password in the password value field using the MD5 function.
Scroll down and click on the Go button to save the changes. Now you will be able to login with the newly configured credentials.