Last active
August 29, 2015 13:56
-
-
Save azhai/8949548 to your computer and use it in GitHub Desktop.
mysql 修改root密码
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
| /etc/init.d/mysql stop | |
| /etc/init.d/mysql start --skip-grant-tables | |
| #回车输入空密码 | |
| mysql -u root -p | |
| --执行SQL语句 | |
| UPDATE mysql.user SET Password=PASSWORD('my-new-password') WHERE User='root'; | |
| FLUSH PRIVILEGES; | |
| quit; | |
| /etc/init.d/mysql restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment