I have a db server db.example.com
CNAME'd to its external ec2 domain ec2-some-ip.aws.com
I have a client ec2-another-ip.aws.com
trying to connect to my db.example.com. I granted privileges:
grant all privileges on *.* to 'some_user'@'ec2-another-ip.aws.com';
and in the client try:
mysql -u some_user -h db.example.com
only to get:
ERROR 1130 (00000): Host 'my-client-internal-mac.compute-1.internal' is not allowed to connect to this MySQL server
So it obviously maps its external domain to the internet domain. So How do I get mysql to allow my client given the restriction below.
NOTE I can't use the internal ip as all these servers are ebs root mounted and i start/stop them all the time, so the internal ip changes, but i map an external elastic ip each time i spin it up so its external ip is always the same