Separate database server on private network
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?