sudo service mysql stop
sudo mysqld_safe --skip-grant-tables &
Restart password
mysql -u root -e 'update user set authentication_string="" where User="root"' mysql
mysql -u root -e 'update user set plugin="mysql_native_password" where User="root"' mysql
mysql -u root -e 'FLUSH PRIVILEGES' mysql
Restart services
sudo service mysql restart