重置Mysql的root密码

service mysql restart  --skip-grant-tables
mysql -u root -ppwd <<EOF
use mysql
update user set password=password("新密码") where user="root";
flush privileges;
EOF
service mysql restart