mysqld_safe --skip-grant-tables&mysql -u root mysql mysql> UPDATE user SET password=PASSWORD("new password") WHERE user="root";mysql> FLUSH PRIVILEGES;