Skip to content

Instantly share code, notes, and snippets.

@6ui11em
Last active March 18, 2021 11:53
Show Gist options
  • Save 6ui11em/f50164994011817e92fd1c5ba0c86e26 to your computer and use it in GitHub Desktop.
Save 6ui11em/f50164994011817e92fd1c5ba0c86e26 to your computer and use it in GitHub Desktop.
Magento2 reset customer password #magento2 #mysql
UPDATE `customer_entity`
SET `password_hash` = CONCAT(SHA2('xxxxxxxxYOURPASSWORD', 256), ':xxxxxxxx:1')
WHERE `entity_id` = 1;
-- REST Customer & Admin password
SET @pass = '123123q'; -- pone el pass q mas te guste
SET @salt = MD5(UNIX_TIMESTAMP());
UPDATE admin_user SET password = CONCAT(SHA2(CONCAT(@salt, @pass), 256), ':', @salt, ':1');
UPDATE customer_entity SET password_hash= CONCAT(SHA2(CONCAT(@salt, @pass), 256), ':', @salt, ':1');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment