Question
Separate database server on private network
Hi
I’ve setup 2 droplets both running Ubuntu 16.04 x64 and enabled private network on both.
I’ve got my Wordpress files on one droplet and my database on a separate droplet.
I’ve edited /etc/mysql/mysql.conf.d/mysqld.cnf on the database server and changed the bind-address to be the private IP of the database server.
I’ve also run ‘sudo ufw allow from WEB-SERVER-PRIVATE-IP to any port 3306 proto tcp’. Where WEB-SERVER-PRIVATE-IP is the wordpress files server private IP address.
I’ve edited the wordpress wp-config file: define('DB_HOST’, 'DATABASE-PRIVATE-IP’); Where DATABASE-PRIVATE-IP is my database server private IP address.
I get “Error establishing a database connection”
Where have I gone wrong?
Thanks
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.
×