Do you have skip_name_resolve set in your /etc/my.cnf? If not, consider it. DNS works fine, until it doesn't. Don't let it catch you off guard.
Do you really need to restrict MySQL users based on hostnames? If you don't, you should probably disable this feature of MySQL's authentication system. You never know when your hosting provider's DNS (or your own for that matter) will go into the toilet. And when that happens, MySQL mysteriously stops letting users log in, and all kinds of chaos ensues. Worse, it can be kind of hard to know that this is the problem, and diagnosing adds to your downtime.
Here's another scenario: DNS doesn't really fail. It just gets a little bit slow. Subtle enough that you don't really notice it, but enough to cause connection problems every now and then.
I've seen both scenarios recently when working with clients. Oh, and did I mention that not enabling skip_name_resolve actually leaves you open …
[Read more]