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

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.

×
1 answer

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

by Mark Drake
Many websites and applications start off with their web server and database backend hosted on the same machine. With time, though, a setup like this can become cumbersome and difficult to scale. A common solution is to separate these functions by setting up a remote database, allowing the server...
Submit an Answer