Wordpress Mysql Connection to new Droplet with Ubuntu 16

Posted October 12, 2016 3.4k views
MySQLWordPressUbuntu 16.04

Hello i have a droplet (ubuntu 14) where configured VHOST on Lamp with few wordpress sites.

Actually all working correctly, but adding back-end new user, comments and other operation cause Wordpress slowdowns, so i decide to add database on new droplet.

So i configured a new Ubuntu 16 droplet with ONE CLICK APP Lamp and test connect one of my wordpress site to Mysql after created new db user and upload db.

Site not connect, time out error....?

Please, can help me
Thank you!

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.

Submit an Answer
1 answer

By default MySQL will not listen on the public interface so you’ll have to adjust the configuration so your web server with WordPress can reach it. I would recommend enabling private networking on both droplets and setting bind-address in the my.cnf on your database droplet to the private network IP. Then restart MySQL. This should get you up and running though you may want to look into additional steps to secure the data passing between the two droplets.

To start fresh, this guide will walk you through the whole process.

by Justin Ellingwood
When your site begins to get more visitors, you may have to think about how to handle the additional traffic. One easy way of doing this is to separate your database operations from your web server so that each can handle its own load. In this guide, we'll demonstrate how to do this for a WordPress site built on Nginx by configuring a remote MySQL database.