The part of making the MySQL server working for both of them is quite easy, but for those who want to know:
- You will have to allow outgoing connections on both web servers to the MySQL server.
- You will have to allow ingoing connections from both web servers to the MySQL server.
- Then you define the MySQL Hostname for your WordPress installation on both web servers to be the IP of your MySQL server
And boom! Both of your web servers are now using the MySQL server, so if you make a new post, they will show up on both web servers.