There are loads of ways to reset a forgotten MySQL root password. Here is my favourite method.
Log into the server
Elevate to root run the command below (the & is important):
service mysql stop
mysqld_safe â€“skip-grant-tables &
Use the following statements to reset the password to changeme
update user set password=PASSWORD(â€œchangemeâ€) where User=â€™rootâ€™;
service mysql start
The password has been reset. Ensure you change it if you used the example above rather than setting your own.