Created
April 16, 2013 13:41
-
-
Save maltzsama/5395981 to your computer and use it in GitHub Desktop.
recover MySQL root password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #1 - Pare o serviço do MySQL: | |
| $service mysqld stop | |
| #2 - Inicie o MySQL sem senha: | |
| $mysqld_safe --skip-grant-tables | |
| #3 - Conecte ao MySQL usando o mysqlclient: | |
| $mysql -u root | |
| #4 - Configure uma nova senha para o MySQL: | |
| mysql> use mysql; | |
| mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root'; | |
| mysql> flush privileges; | |
| mysql> quit | |
| #5 - Reinicie o serviço do MySQL: | |
| $service mysqld restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment