# service mysqld stop
.....
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('root') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -u root -p
Enter password:
mysql>
转载请注明:谷谷点程序 » mysql 修改密码