Created
May 10, 2010 14:49
-
-
Save bcalloway/396123 to your computer and use it in GitHub Desktop.
Reset MySQL root password
This file contains 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
mysql> update user set password=PASSWORD('') where user='root'; | |
Query OK, 2 rows affected (0.03 sec) | |
Rows matched: 2 Changed: 2 Warnings: 0 | |
mysql> flush privileges; | |
Query OK, 0 rows affected (0.02 sec) | |
mysql> exit | |
Bye |
This file contains 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
Brandon-Calloways-MacBook-Pro-15:~ $ ps ax | grep mysql | |
769 ?? Ss 0:00.02 /bin/sh /usr/local/mysql/bin/mysqld_safe | |
820 ?? S 0:00.16 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --log-error=/usr/local/mysql/var/Brandon-Calloways-MacBook-Pro-15.local.err --pid-file=/usr/local/mysql/var/Brandon-Calloways-MacBook-Pro-15.local.pid | |
Brandon-Calloways-MacBook-Pro-15:~ $ sudo kill 820 |
This file contains 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
Brandon-Calloways-MacBook-Pro-15:~ $ sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables & | |
[1] 7732 | |
Starting mysqld daemon with databases from /var/lib/mysql | |
mysqld_safe[7783]: started |
This file contains 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
Brandon-Calloways-MacBook-Pro-15:~ $ sudo /usr/local/mysql/bin/mysqld_safe | |
[1] 8752 | |
Starting mysqld daemon with databases from /var/lib/mysql | |
mysqld_safe[8773]: started |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment