Skip to content

Instantly share code, notes, and snippets.

@Amitesh
Created July 13, 2011 06:33
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 Amitesh/1079829 to your computer and use it in GitHub Desktop.
Save Amitesh/1079829 to your computer and use it in GitHub Desktop.
Reset Mysql root password
Reset Mysql root password
$ sudo stop mysql
$ sudo start mysql
$ mysql -u root
mysql> SET PASSWORD FOR root@'localhost' = PASSWORD('a_real_pwd');
mysql> exit
bye
try : mysql -uroot -p
update mysql.user set Password = Password('yourpassword') where user = 'root';
Read this post
https://help.ubuntu.com/community/MysqlPasswordReset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment