Grant access rights to a MySQL instance based on hostname instead of IP address?
MySQL has supported DNS based authentication for a long time. The problem is that it needs you to set up the reverse as well as the forward lookups.
If you are able to set both the forward and reverse records then it all should be easy.
See the section about How MySQL Uses DNS in the manual for full details.