To recover the MySQL root password if forgotten.
--skip-grant-tables
-u root
UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
FLUSH PRIVILEGES;
mysqladmin shutdown