mysql user@% can access from localhost

I was always told that "%" means every host except localhost.

However I have created a user4@"%" and I can connect to from localhost.

screenshot

So now I am a bit confused regarding this. Can anyone clarify this for me, please?


I was always told that "%" means every host except localhost.

This is plain wrong.

% is a wildcard. It matches 0 or more of any character:

SQL pattern matching enables you to use _ to match any single character and % to match an arbitrary number of characters (including zero characters)

Thus % in the hostname field matches any host, including localhost.