I have my app (WordPress) and database on separate servers. I’ve made sure that the database server only talks on the private network (new feature from DO) and only allows the app server to talk to it over the former’s private IP.
So, when I try to install wordpress via http://example.com/wp-admin/install.php it’s unable to connect with the database because it’s contacting the DB server from its public IP, hence giving me this, “Error establishing a database connection”.
Is there a way to make sure that wordpress connects with the database over private IP?
For clarity here are the relevant settings in use on my database server: https://gist.github.com/aahan/56bf2860929a8f98b1a6
Any idea what I am doing wrong there?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!