Skip to content

Instantly share code, notes, and snippets.

@gabrielstuff
Created November 19, 2011 11:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielstuff/1378751 to your computer and use it in GitHub Desktop.
Save gabrielstuff/1378751 to your computer and use it in GitHub Desktop.
This little snippet helps to reset mysql root password
$ ps -ax
$ #Kill all the related mysql process and direct run the next lines#
$ sudo /usr/local/mysql/bin/mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
#direct log after execute bellow command#
$ mysql -u root
mysql > database mysql;
mysql > UPDATE mysql.user SET password=PASSWORD('nouveau') WHERE user='root';
# you are now happy :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment