I've just faced the same problem.
It happened because the MySQL Daemon was binded to the IP of the machine, which is required to make connection with an user that has permission to connect @your_machine.
In this case, the user should have permission to connect USER_NAME@MACHINE_NAME_OR_IP
I wanted remote access to my machine so I changed in my.cnf from
bind-address = MY_IP_ADDRESS
To
bind-address = 0.0.0.0
Which will allow an user from localhost AND even outside (in my case) to connect to the instance.
Both below permissions will work if you bind the MySQL to 0.0.0.0:
USER_NAME@MACHINE_NAME_OR_IP
USER_NAME@localhost