--skip-grant-tables
* Start the mysql client
-u root
* Execute the command
UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
* Execute the command
FLUSH PRIVILEGES;
* Use mysqladmin to shut down the MySQL daemon:
mysqladmin shutdown
* Start MySQL server as per normal.