Figure out what IP address MySQL resolves a host name to I'm setting up a MySQL slave, but it can't connect to master (error 2003). Master is available. I suspect that MySQL resolves Master's hostname to some unexpected IP address and consequently chooses different route which is not allowed to connect to the master. Both master and slave are RDS MySQL in different VPCs :)

So how can I figure out what IP address MySQL gets using only MySQL commands or logs?
Alright.. It was wrong TCP port. Sorry :) So I solved my problem with RDS connectivity. But the second part still stands: MySQL server as a "DNS resolver". While dealing with RDS I tried to go with PostgreSQL, because if it were DNS problem it would affect PostgreSQL as well. I figured that I can do it in PostgreSQL with various extensions like plperlu. Unfortunately, all of them are blocked in RDS :)