How does mysql determine the hostname of its clients?

view full story

http://serverfault.com – I'm trying to create a MySQL user which will only be allowed to connect to the MySQL database from a specific hostname. grant all on db_name.* to 'user_name'@'appserver-lan.mydomain.com' identified by 'some_passwd' By checking the user table on the mysql db, I can see that the user was created successfully: use mysql; select * from user where User='user_name' and Host='appserver-lan.mydomain.com' or show grants for 'username'@'appserver-lan.mydomain.com' The hostname I specified is an alias to an amazon-ec2 name, which when resolved by the AWS DNS (HowTos)