Skip to content

Instantly share code, notes, and snippets.

@Amitesh
Created July 13, 2011 06:33
Show Gist options
  • 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