At work, my team have a MySQL database on a Linux 14.04 box. My team is working on changing the permissions to use hostnames rather than IPs (so that the IT team can do what they want to the network and not worry about breaking our access).
For example, there would be a user admin@10.10.xxx.xxx
that we will want to change to admin@my-ws.co.local
. I've been playing around with my user (since I have root and can still log in). After changing the user profile's host from the IP address to the Hostname, Workbench will give the error...
HOST '10.10.xxx.xxx' is not allowed to connect to this MySQL server
When I log in to the Linux box and use nslookup my-ws.co.local
, the response gives me the correct IP address, so I know there no connection issue between the box and the network. And since the response is correct, I am assuming that the internal DNS is working correctly.
Checking the performance_schema.host_cache
table, I can see that the IP 10.10.xxx.xxx
was not resolved into a host (the HOST
column is NULL
and the HOST_VALIDATED
column is YES
).
Why is MySQL unable to resolve the IP address into the correct hostname, while nslookup
works? Is there some setting in MySQL that I need to fix? Do there need to be records in the internal DNS for each workstation of my team?