You can see once thing, the solution is to revert back to native password authentication. You can do this by logging in to MySQL using socket authentication by doing:
sudo mysql -u root
Once logged in:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Which will revert back to the native (old default) password authentication.
Now use password as the password whenever required by MySQL.