---
title: Charmhub | Deploy Charmed MySQL using Charmhub - The Open Operator Collection
description: Deploy the latest version of Charmed MySQL on any cloud.
url: https://charmhub.io/mysql/actions
---

# Charmed MySQL

[Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")

* [Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")
* [Cloud](https://charmhub.io/?filter=cloud)
* [Databases](https://charmhub.io/?filter=databases)

Platform:

26.04

22.04

8.0/stable 444

```
juju deploy mysql --channel 8.0/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [create-backup](https://charmhub.io/mysql/actions#create-backup)
* [create-replication](https://charmhub.io/mysql/actions#create-replication)
* [get-cluster-status](https://charmhub.io/mysql/actions#get-cluster-status)
* [get-password](https://charmhub.io/mysql/actions#get-password)
* [list-backups](https://charmhub.io/mysql/actions#list-backups)
* [pre-upgrade-check](https://charmhub.io/mysql/actions#pre-upgrade-check)
* [promote-to-primary](https://charmhub.io/mysql/actions#promote-to-primary)
* [recreate-cluster](https://charmhub.io/mysql/actions#recreate-cluster)
* [rejoin-cluster](https://charmhub.io/mysql/actions#rejoin-cluster)
* [restore](https://charmhub.io/mysql/actions#restore)
* [set-password](https://charmhub.io/mysql/actions#set-password)
* [set-tls-private-key](https://charmhub.io/mysql/actions#set-tls-private-key)

[Learn about actions >](https://juju.is/docs/juju/action)

* create-backup

  Create a database backup using xtrabackup. S3 credentials are retrieved from a relation with the S3 integrator charm.

  Params

  + force
    boolean

    Whether to ignore cluster health concerns and create the backup regardless.
    Use it with caution, as it can potentially create a backup from stale data.
* create-replication

  Create replication between two related clusters.
  This action is must be run on the offer side of the relation.

  Params

  + name
    string

    A (optional) name for this replication.
* get-cluster-status

  Get cluster status information

  Params

  + cluster-set
    boolean

    Whether to fetch the cluster or cluster-set status. Possible values are False (default) or True.
* get-password

  Fetch the system user's password, which is used by charm. It is for internal charm users and SHOULD NOT be used by applications.

  Params

  + username
    string

    The username, the default value 'root'. Possible values - root, serverconfig, clusteradmin.
* list-backups

  List available backup\_ids in the S3 bucket and path provided by the S3 integrator charm.
* pre-upgrade-check

  Run necessary pre-upgrade checks and preparations before executing a charm refresh.
* promote-to-primary

  Promotes the unit or cluster to become the primary in the cluster or cluster-set, depending on
  the scope (unit or cluster). Used for safe switchover or failover.
  When in cluster scope, can only be run against the charm leader unit of a standby cluster.

  Params

  + force
    boolean

    For cluster scope, use force when previous primary is unreachable (failover). Will invalidate previous
    primary.
    For unit scope, use force to force quorum from the current unit. Note that this operation is DANGEROUS
    as it can create a split-brain if incorrectly used and should be considered a last resort. Make
    absolutely sure that there are no partitions of this group that are still operating somewhere in
    the network, but not accessible from your location
  + scope
    string

    Whether to promote a unit or a cluster. Must be set to either `unit` or `cluster`.
* recreate-cluster

  Recreates cluster on one or more standalone units that were previously part of a standby cluster.

  When a standby cluster is removed from an async replication relation, the cluster will be dissolved and
  each unit will be kept in blocked status. Recreating the cluster allows to rejoin the async replication
  relation, or usage as a standalone cluster.
* rejoin-cluster

  Rejoins an invalidated cluster to the cluster-set, after a previous failover or switchover.

  Params

  + cluster-name
    string

    The name of the cluster to be rejoined.
* restore

  Restore a database backup using xtrabackup. S3 credentials are retrieved from a relation with the S3 integrator charm.

  Params

  + backup-id
    string

    A backup-id to identify the backup to restore (format = %Y-%m-%dT%H:%M:%SZ)
  + restore-to-time
    string

    Point-in-time-recovery target (format = %Y-%m-%d %H:%M:%S).
* set-password

  Change the system user's password, which is used by charm. It is for internal charm users and SHOULD NOT be used by applications.

  Params

  + password
    string

    The password will be auto-generated if this option is not specified.
  + username
    string

    The username, the default value 'root'. Possible values - root, serverconfig, clusteradmin.
* set-tls-private-key

  Set the privates key, which will be used for certificate signing requests (CSR). Run for each unit separately.

  Params

  + internal-key
    string

    The content of private key for internal communications with clients. Content will be auto-generated if this option is not specified.
