Created
July 16, 2014 01:34
-
-
Save heyalexej/3824b0b2695cf5f1af52 to your computer and use it in GitHub Desktop.
reset mysql 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
#!/usr/bin/env sh | |
set -e | |
# Stop MySQL | |
sudo /etc/init.d/mysql stop | |
# Start MySQL skipping checks | |
sudo mysqld --skip-grant-tables & | |
# Log in as root | |
mysql -u root mysql | |
# Reset password | |
UPDATE user SET password=PASSWORD('91e4-2ce26006b1b7') WHERE user='root'; | |
FLUSH PRIVILEGES; | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment