After my fresh installation of MySQL 8.0.24 on Ubuntu 20.10, I was unable to login with
mysql -u root and gives me "Error 1698 (28000): Access denied for user 'root'@'localhost'"
mysql -u root
which results in
Error 1698 (28000): Access denied for user 'root'@'localhost'
However, I was able to login with sudo mysql -u root.
sudo mysql -u root
I guess this is because super user in linux is the root user.