Mysql remote access through private IP

Private networking is set up on both droplets

I have sucessfully set up a remote MySQL connection using public IP, but when I switch the bind-address to the private IP of the database server the remote droplet receives a 110 error and can’t connect on the private IP


My server node: has bind-address commented out has a test user created in the database linked to the private IP of my client node with privileges granted. I can successfully log into the test user on my server node.

My client node: has mysql-client installed can log into the test user and see the database as expected.

Now, the problem is with PDO objects and PHP on my webpage. The page is properly loading but is not able to access the remote db.

The PDO object is using the same user/password/host that was created and tested on both server and client node.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

You should use a SSH tunnel unless you want all your MySQL data plaintext over the network.