Reset the root password of a MySQL server
sudo nano /etc/mysql/my.cnf
[mysqld] skip-grant-tables
sudo service mysql restart
mysql -u root
UPDATE mysql.user set authentication_string = PASSWORD('your_new_password') where user = 'root' and host = 'localhost';
exit