Created
April 7, 2014 09:22
-
-
Save peter-mcconnell/10017193 to your computer and use it in GitHub Desktop.
Mysql - reset 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. Stop the MySQL Server. | |
| `sudo /etc/init.d/mysql stop` | |
| 2. Start the mysqld configuration. | |
| `sudo mysqld --skip-grant-tables &` | |
| 3. Login to MySQL as root. | |
| `mysql -u root mysql` | |
| 4. Replace YOURNEWPASSWORD with your new password! | |
| `UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment