[mysql] Access denied for user 'root'@'localhost' while attempting to grant privileges. How do I grant privileges?

One simple solution which always works for me when faced with mysql "access denied" errors: use sudo.

sudo mysql -u root

Then the necessary permissions exist for GRANT commands.