Mysql Router
- By MySQL Charm Maintainers
- Cloud
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/edge | 188 | 09 May 2024 | |
8.0/stable | 189 | 13 May 2024 | |
dpe/candidate | 186 | 06 May 2024 | |
dpe/beta | 186 | 02 May 2024 | |
dpe/edge | 186 | 02 May 2024 | |
8.0.19/stable | 26 | 05 May 2022 | |
8.0.19/edge | 26 | 05 May 2022 |
juju deploy mysql-router --channel dpe/beta
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
22.04
Interfaces/endpoints
MySQL Router supports modern ‘mysql_client’ interface. Applications can easily connect MySQL using ‘data_interfaces’ library from ‘data-platform-libs’.
Modern mysql_client
interface (database
endpoint):
Adding a relation is accomplished with juju relate
(or juju integrate
for Juju 3.x) via endpoint database
. Read more about Juju relations (integrations). Example:
# Deploy Charmed MySQL and MySQL Router clusters
juju deploy mysql -n 3
juju deploy mysql-router -n 3 --channel dpe/edge
# Deploy the relevant charms, e.g. mysql-test-app
juju deploy mysql-test-app
# Relate all applications
juju integrate mysql mysql-router
juju integrate mysql-router:database mysql-test-app
# Check established relation (using mysql_client interface):
juju status --relations
# Example of the properly established relation:
# > Integration provider Requirer Interface Type Message
# > mysql:database mysql-router:backend-database mysql_client regular
# > mysql-router:database mysql-test-app:database mysql_client regular
# > ...
Note: In order to relate with Charmed MySQL, every table created by the client application must have a primary key. This is required by the group replication plugin enabled in this charm.
See all the charm interfaces here.