Skip to content

Instantly share code, notes, and snippets.

@Disassembler0
Created October 14, 2017 20:39
Show Gist options
  • Save Disassembler0/8e378283caba364a84452bd6f70b44cf to your computer and use it in GitHub Desktop.
Save Disassembler0/8e378283caba364a84452bd6f70b44cf to your computer and use it in GitHub Desktop.
Reset MySQL password
systemctl stop mysql
mysqld_safe --skip-grant-tables &
mysql -u root mysql
UPDATE user SET password=PASSWORD('password') WHERE user='root';
FLUSH PRIVILEGES;
quit
systemctl restart mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment