I can't figure this out, so hopefully somebody can explain to me why and what's most secure:
I'm hosting a Magento webshop on a VPS at DigitalOcean, but to make things more secure I thought it would be safer to keep my MySQL database on a dedicated VPS which is only accessible by private networking and disconnected from the public (because of all the user information it will contain). But this still doesn't feel right, because in what way is this safer? If somebody hacks the front-end server, which has access to the database server through private networking, they still can access the information on that server, right? If that's the case I can just keep the database on the same server...
An API connection with the database server would be better I guess, while closing all other ports to that server, but I'm working with Magento so that's not an option.
So what do you guys advice. Is it safe enough to keep my mysql on a dedicated server with private networking? Or are there better ways?