Skip to content

Instantly share code, notes, and snippets.

@bse666
Created June 7, 2016 13:35
Show Gist options
  • Save bse666/67502616e60ce7b835f9b5129f1a68e0 to your computer and use it in GitHub Desktop.
Save bse666/67502616e60ce7b835f9b5129f1a68e0 to your computer and use it in GitHub Desktop.
/etc/init.d/mysql stop || systemctl stop mysqld
mysqld_safe --skip-grant-tables
mysql --user=root mysql
update user set Password=PASSWORD('new-password') where user='root';
flush privileges;
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment