Reset MySQL Root Password (On MySQL Version 5.7.6 and later)
Stop MySQL Service and Start it again with --skip-grant-tables options
sudo service mysqld stop sudo mysqld_safe --skip-grant-tables &
Login to mysql server
mysql
From MySQL Prompt reset the password
FLUSH PRIVILEGES;
For MySQL 5.7.6 and later
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';
For MySQL 5.7.5 and earlier
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('[password]');
Restart MySQL Service
service mysqld stop service mysqld start
Validate
mysql -u root -p [Enter Password and login ]