MySQL DNS issue: skip-name-resolve connection fast but cannot log into email
Workaround:

Keeping skip-name-resolve in place, I changed shunned users having non-IP number hostnames in the users table as follows:

UPDATE mysql.user SET Host='127.0.0.1' WHERE Host='localhost' AND User='username';
UPDATE mysql.db SET Host='127.0.0.1' WHERE Host='localhost' AND User='username';
FLUSH PRIVILEGES;


I will delve into the DNS problem when I have a spare weekend.

(Changed % to 127.0.0.1 as requested in a comment, as with % everyone would be able to access MySQL with username, with no IP checks. localhost is resolved as 127.0.0.1 in most cases (see your /etc/hosts). - [ed.])