Question

Share database between droplets in VPC Network

I have several droplets and use ServerPilot. Is it possible to access the database in one droplet from another when they are in the same VPC? I followed the VPC instructions and am able to ping the Private IPs between droplets, but it’s not letting me connect to a database in PHP.

My databases are created using ServerPilot. If this is a firewall issue it looks like I would neat a subscription with HeatShield for custom firewall rules, but I would prefer not to get another subscription.

I created a Managed Database and that works in multiple droplets, but I was wondering if this is possible without needing the Managed Database.

Thank you

Subscribe
Share

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.

Hi there @arthur3,

I have not done this through ServerPilot, but the answer should be yes, this should be doable.

What you would need to do is to prepare your MySQL instance for remote connections, to do that you can follow the steps here:

https://www.digitalocean.com/community/tutorials/how-to-allow-remote-access-to-mysql

Let me know how it goes! Regards, Bobby