Charmed MySQL
- Canonical
- Cloud
Channel | Revision | Published | Runs on |
---|---|---|---|
8.0/stable | 240 | 20 Jun 2024 | |
8.0/candidate | 297 | 15 Oct 2024 | |
8.0/candidate | 296 | 15 Oct 2024 | |
8.0/beta | 297 | 07 Oct 2024 | |
8.0/beta | 296 | 07 Oct 2024 | |
8.0/edge | 303 | 09 Oct 2024 | |
8.0/edge | 302 | 09 Oct 2024 |
juju deploy mysql --channel 8.0/edge
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
Note: All commands are written for juju >= v.3.0
If you are using an earlier version, check the Juju 3.0 Release Notes.
How to integrate with another application
Integrations (formerly “relations”) are connections between two applications with compatible endpoints. These connections simplify the creation and management of users, passwords, and other shared data.
This guide shows how to integrate Charmed MySQL with both charmed and non-charmed applications.
For developer information about how to integrate your own charmed application with MySQL, see Development > How to integrate with your charm.
Summary
- Integrate with a charmed application
- Integrate with a non-charmed application
- Rotate application passwords
Integrate with a charmed application
Integrations with charmed applications are supported via the mysql_client
interface, and the legacy mysql
interface.
Modern mysql_client
interface
To integrate with a charmed application that supports the mysql_client
interface, run
juju integrate mysql <charm>
To remove the integration, run
juju remove-relation mysql <charm>
Legacy mysql
interface
Note that this interface is deprecated. See more information in Explanation > Legacy charm.
To integrate via the legacy interface, run
juju integrate mysql:mysql <charm>
Extended permissions can be requested using mysql-root
endpoint:
juju integrate mysql:mysql-root <charm>
Integrate with a non-charmed application
To integrate with an application outside of Juju, you must use the data-integrator
charm to create the required credentials and endpoints.
Deploy data-integrator
:
juju deploy data-integrator --config database-name=<name>
Integrate with MySQL:
juju integrate data-integrator mysql
Use the get-credentials
action to retrieve credentials from data-integrator
:
juju run data-integrator/leader get-credentials
Rotate applications password
To rotate the passwords of users created for related applications, the relation should be removed and related again. That process will generate a new user and password for the application.
juju remove-relation <charm> mysql
juju integrate <charm> mysql
Internal operator user
The operator user is used internally by the Charmed MySQL application. The set-password
action can be used to rotate its password.
To set a specific password for the operator
user, run
juju run mysql/leader set-password password=<password>
To randomly generate a password for the operator
user, run
juju run mysql/leader set-password