Skip to content

Instantly share code, notes, and snippets.

@underdown
Created February 28, 2018 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save underdown/3d934e6d590b4091d641df06b33ded4f to your computer and use it in GitHub Desktop.
Save underdown/3d934e6d590b4091d641df06b33ded4f to your computer and use it in GitHub Desktop.
reset mysql root pass
sudo /etc/init.d/mysql stop
sudo mysqld --skip-grant-tables &
mysql -u root mysql
UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment