Reset Magento 2 admin password via database
This easy code snippet will help you to easily reset or change you admin user password through database.
1 |
UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxYourNewPassword', 256), ':xxxxxxx:1') WHERE username = 'admin'; |
The xxxxxxx
character sequence is a cryptographic salt, it is saved in app\etc\env.php
file
1 2 3 4 5 6 7 8 |
<?php return array ( ... 'crypt' => array ( 'key' => '525701df74e6cba74d5e9a1bb3d935ad', //cryptographic salt ), ... |
Enjoy!