Last active
November 20, 2015 06:42
-
-
Save forestbaker/0597f9cd62e50aa606b1 to your computer and use it in GitHub Desktop.
reset mysql password for root user
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
service mysql stop | |
mysqld_safe --skip-grant-tables > /dev/null 2>&1 & | |
# wait for previous command to complete | |
mysql -u root -e "use mysql; update user set password=PASSWORD('NEW-PASSWORD') where user='root'; flush privileges;" | |
service mysql start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment