MySQL Access denied for user 'root'@'localhost'
Solution 1:
If you're running n localhost, just type the command below in terminal:
mysql -u root -p
If you're using an external server, enter the host IP (xxx.xxx.xxx.xxx) as well:
mysql -hxxx.xxx.xxx.xxx -uroot -p
You will be prompted for your password, enter it and you will be able to access your MySQL prompt.
You can also look at this answer on how to reset your MySQL password.
Solution 2:
I get the same symptoms when I update, but for me the fix (after killing mysql and restarting with --skip-grant-tables to get in) is to execute
update mysql.user set plugin = '';
The update process likes to set this column to "unix_socket". I don't know what that is supposed to accomplish, but for me it breaks everything.