Make your site use a remote database easily and securely
Making your web application use a remote database is something trivial with Moss. In this example, we’re installing a WordPress site on server
app-00 that will use a database hosted on server
In addition to installing and setting up the required software on each server, Moss will add a firewall rule to allow traffic towards the MySQL service from the web server. Furthermore, Moss provides your application with the right database connection URL in case you’re creating a Laravel, Symfony or WordPress site. If it’s a different PHP site, you must provide your application with the connection URL on your own (usually via a config or vars file).
When creating the site, do it as usual. In particular, choose the server where the web application will be hosted.
When you reach the Database connection step, simply choose an existing connection with the remote database or, as in this example, create a new one.
Note that now we choose the database server. The corresponding database and user will be created here, then the latter will be granted permissions on the former.
And that’s it. Fill out the remainder of the form and click Create when you’re done.