- Open terminal and tyfollowing commands one by one. Do not close the terminal after you are done
sudo mysql
USE mysql;
UPDATE user SET authentication_string=PASSWORD('YOUR_PASSWORD') WHERE User='root';
UPDATE user SET plugin="mysql_native_password";
FLUSH PRIVILEGES;
quit;
- Open new terminal and try to login with the following commad
mysql -u root -p
<Enter your new password>
- If step 2 does not work, redo step1 on terminal1