I had the same error, but it was because password_expired
was set to Y
. You can fix that issue by following the same approach as the currently accepted answer, but instead executing the MySQL query:
UPDATE mysql.user SET password_expired = 'N' WHERE User='root';