Last active
March 5, 2020 18:55
-
-
Save phaelfp/b5e0f0ac81049899b514de02fcfab091 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Magento 1 | |
SET @passwd='newpassord', @salt='5k'; | |
For admin | |
update admin_user SET password = CONCAT(MD5(CONCAT(@salt , @passwd)), CONCAT(":", @salt )) where email = '[email protected]'; | |
For customer | |
update customer_entity_varchar set value = CONCAT(MD5(CONCAT(@salt , @passwd)), CONCAT(":", @salt )) | |
where entity_id IN (select entity_id from customer_entity where email = '[email protected]') | |
and attribute_id in ( select attribute_id from eav_attribute where entity_type_id = 1 and attribute_code = 'password_code' ) | |
and entity_type_id = 1; | |
Magento 2 | |
SET @passwd='newpassord', @salt=MD5(RAND()); | |
For admin | |
update admin_user SET password = CONCAT(SHA2(CONCAT(@salt, @passwd), 256), ':', @salt, ':1') where email = '[email protected]'; | |
For customer | |
update customer_entity SET password_hash = CONCAT(SHA2(CONCAT(@salt, @passwd), 256), ':', @salt, ':1') where email = '[email protected]'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment