Skip to content

Instantly share code, notes, and snippets.

@reinaldomendes
Last active February 27, 2026 02:10
Show Gist options
  • Select an option

  • Save reinaldomendes/db70f282dabe7c045c956e1e7e3fc59a to your computer and use it in GitHub Desktop.

Select an option

Save reinaldomendes/db70f282dabe7c045c956e1e7e3fc59a to your computer and use it in GitHub Desktop.
Magento 2
set @salt=substr(md5(concat('salt',CURRENT_TIME)),1,5);
set @pass='pass';
set @user="root";
update admin_user set `password`=CONCAT(SHA2(concat(@salt,@pass), 256),":",@salt,":1") WHERE `username`=@user;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment