My goal is to have a single EC2 instance containing both WordPress and its MySQL database on same VPC and have the WordPress available on the public subnet and MySQL on the private subnet. The purpose is to reduce MySQL exposure to public traffic without having to place it on a separate EC2 instance.
To achieve this I launched an EC2 instance in the public subnet and attached a network interface for the private subnet. I then installed WordPress and MySQL which by default installs on the public subnet.
What I'm not clear on is how to place the MySQL on the private subnet and accessible by WordPress. I tried a bind address to an IP within the private subnet. However, whenever I do, WordPress becomes inaccessible. If I switch the bind to the IP address of my instance WordPress works.