How to connect to your database outside the local network

This page summarises resources for setting up deployments where an external application must connect to a MySQL database from outside the local area network.

External application (non-Juju)

Use case: the client application is a non-Juju application outside of Juju, Kubernetes, or the local area network the database is connected to.

The available options are heavily depend on the cloud/hardware/virtualization in use. One of the possible options is to use virtual IP addresses (VIP) which the MySQL Router charm provides with assist of the charm/interface hacluster.

Please follow the MySQL Router documentation:

External relation (Juju)

Use case: the client application is a Juju application outside of the database deployment (e.g. hybrid Juju deployment with different VM clouds/controllers, or mixed K8s and VM applications).

In this case, a cross-controllers relation is necessary. Please contact the Data team to discuss the possible option for your use case.