Do not grant all privileges over all databases to a non-root user, it is not safe (and you already have “root” with that role)
GRANT
This statement creates a new user and grants selected privileges to it.
I.E.:
GRANT INSERT, SELECT, DELETE, UPDATE ON database.* TO ‘user’@’localhost’ IDENTIFIED BY ‘password’;
Take a look at the docs to see all privileges detailed
EDIT: you can look for more info with this query (log in as “root”):
select Host, User from mysql.user;
To see what happened
If you are connecting to the MySQL using remote machine(Example workbench) etc., use following steps to eliminate this error on OS where MySQL is installed
mysql -u root -p
CREATE USER ‘<
GRANT ALL PRIVILEGES ON * . * TO ‘<
FLUSH PRIVILEGES;
Try logging into the MYSQL instance.
This worked for me to eliminate this error.