Interfaces and endpoints

Charmed MySQL 8.4 supports the modern mysql_client interface.

Interface

Endpoints

VM charm

K8s charm

modern

mysql_client

database

check

check

It does NOT support legacy mysql, mysql-shared, mysql-router interfaces. For information about legacy interfaces, see the Charmed MySQL 8.0 documentation

Modern relations

This charm provides the modern mysql_client interface. Applications can easily connect MySQL using data_interfaces library from data-platform-libs .

mysql_client interface, database endpoint

Adding a Juju relation is accomplished with juju integrate via endpoint database.

Example:

# Deploy Charmed MySQL cluster with 3 nodes
juju deploy mysql -n 3 --channel 8.4/edge

# Deploy the relevant charms, e.g. mysql-test-app
juju deploy mysql-test-app

# Relate MySQL with your application
juju integrate mysql:database mysql-test-app:database

# Check established relation (using mysql_client interface):
juju status --relations

# Example of the properly established relation:
# > Relation provider   Requirer                 Interface     Type
# > mysql:database      mysql-test-app:database  mysql_client  regular
# Deploy Charmed MySQL cluster with 3 nodes
juju deploy mysql-k8s -n 3 --trust --channel 8.4/edge

# Deploy the relevant charms, e.g. mysql-test-app
juju deploy mysql-test-app

# Relate MySQL with your application
juju integrate mysql-k8s:database mysql-test-app:database

# Check established relation (using mysql_client interface):
juju status --relations

# Example of the properly established relation:
# > Relation provider      Requirer                 Interface     Type
# > mysql-k8s:database     mysql-test-app:database  mysql_client  regular

See details about database user roles in Users.

Note

In order to integrate with this charm, every table created by the integrated application must have a primary key. This is required by the group replication plugin enabled in this charm.

Legacy relations

Legacy relations are deprecated and will be discontinued from Charmed MySQL 8.4 onward. Their usage should be avoided.

For information about legacy interfaces, see the Charmed MySQL 8.0 documentation