I have an EC2 instance running mysql, the problem is every time an ec2 instance reboots it gets new local IP address. So I was wondering if I could just set bind-address in my.cnf to listen on all local interfaces which would allow it to work after a reboot.
I know could specify 0.0.0.0 but I'd prefer to only listen on local if possible, even though the firewall doesn't allow external connections.
mysql doesn't know the difference between amazon's local and public addresses. so no, there is no native feature that does this.
what you could do is write an interface script so that every time the interface is brought up, the IP address is written in to the mysql configuration.
however, i would just use * or 0.0.0.0. like you said, you already have a firewall. additionally, you can set up the users in your mysql database to only allow login from amazon's local addresses.