Skip to content

Instantly share code, notes, and snippets.

@formigarafa
Created July 19, 2011 17:52
Show Gist options
  • Save formigarafa/1093256 to your computer and use it in GitHub Desktop.
Save formigarafa/1093256 to your computer and use it in GitHub Desktop.
Removing MySQL root password
$ mysql -u root -p
Enter password: # <= but, this will be the last time
mysql> SET PASSWORD FOR root@localhost=PASSWORD('');
Query OK, 0 rows affected (0.00 sec)
mysql> exit
bye
$ mysql -u root # with no password, cause I know what i'm doing.
@brunosslima
Copy link

$ mysql -u root -p
Enter password: # <= but, this will be the last time

mysql> use mysql
mysql> UPDATE user SET password='123456' WHERE user='root'
Query OK, 0 rows affected (0.00 sec)

mysql> exit
bye

Já desse jeito dá uma meeeerrrda, e bye bye!
Mas é claro que você sabe porque! Encriptação da senha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment