MySQL - grant all privileges on *.* brings back Access denied GRANT ALL PRIVILEGES ON *.* TO  'username'@'localhost'  IDENTIFIED  BY  'somepassword';


Brings back error :

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


If I give a database name it works.

GRANT ALL PRIVILEGES ON dbname.* TO  'username'@'localhost'  IDENTIFIED  BY  'somepassword';


I did select * from user where user ='root'; and it has Y under every *_priv column.

I'm running MySQL Server version: 5.5.38. Does anyone know why this is happening?
You did not upgrade properly try running:

/usr/bin/mysql_upgrade -u root -p