MySQL Community Server (mysql)
Relational database for the services that require MySQL. Standalone or GTID replication (one source, replicas).
Generated from catalog/services/mysql.yaml: do not edit by hand.
Summary
| |
|---|
| Version | 8.4.5 |
| Use | install and configure |
| Layer | infrastructure (shown apart) |
| Category | Data platforms |
| Installation methods | podman, package |
| External connection | mysql |
| Sandbox only | no |
Licence
| |
|---|
| SPDX identifier | GPL-2.0-only |
| Licence policy | licence exception |
| Licence exception | LEX-003 (pending, awaiting the client) |
| Platform component | mysql |
Packages and artifacts
A package the project of the service publishes (its image, its binary archive, its Python or OS package) carries the licence of the service; a third-party package carries the licence written on its row, read from the official upstream metadata.
| Kind | Package | Version | Licence | Details |
|---|
| container image | docker.io/library/mysql | 8.4.5 | GPL-2.0-only | image key mysql, used by mysqld, digest sha256:679e7e924f38a3cbb62a3d7df32924b83f7321a602d3f9f967c01b3df18495d6 |
| OS package | mysql-community-server | version of the configured repository | GPL-2.0-only | RHEL family (dnf) |
| OS package | mysql-community-client | version of the configured repository | GPL-2.0-only | RHEL family (dnf) |
| OS package | mysql-server | version of the configured repository | GPL-2.0-only | Debian family (apt) |
| OS package | mysql-client | version of the configured repository | GPL-2.0-only | Debian family (apt) |
Images are pinned by tag in the descriptor, and by digest when the descriptor declares one (the offline bundle then refuses a pulled image that does not carry it); the digest is recorded in the mirror of the Manager when the offline bundle is imported, and every pull or load is checked against it.
Supported systems and architectures
| Method | Operating systems | Architectures |
|---|
podman | RHEL family (dnf), Debian family (apt), Arch Linux (pacman) | x86_64, aarch64 (not restricted by the descriptor) |
package | RHEL family (dnf), Debian family (apt) | x86_64, aarch64 (not restricted by the descriptor) |
Certified host systems: RHEL 8/9/10, Rocky Linux 8/9/10, AlmaLinux 8/9/10, Oracle Linux 8/9, CentOS Stream 9/10, Ubuntu 22.04/24.04, Debian 12, Arch Linux (rolling). The host preflight accepts these systems (other releases of a known family give a warning, end of life releases are refused) and the x86_64 and aarch64 architectures.
Prerequisites
Host
- at least 2048 MB of memory (blocking,
memory).
Network and ports
| Component | Port name | Port | Opened in the host firewall |
|---|
mysqld | sql | 3306/tcp | yes |
Services and connections needed
This service has no dependency.
Installation methods and modes
| Method | Default | What the method uses |
|---|
podman | yes | the container images of the descriptor, run by Podman under systemd |
package | - | the OS packages of the descriptor, installed by the package manager of the host |
Components
| Component | Kind | Installation methods | Ports |
|---|
MySQL server (mysqld) | master | podman, package | 3306/tcp |
Single server (standalone) (default)
One MySQL server.
What the mode deploys:
| Component | Placement |
|---|
mysqld | min 1, max 1 |
GTID replication (replication)
The first host is the source, the other hosts are read only GTID replicas.
What the mode deploys:
| Component | Placement |
|---|
mysqld | min 2, recommended 3 |
Install this service
The install wizard of the Navin Manager plans, validates and runs the installation; you need the services:install permission on the cluster.
-
Open the wizard. In Clusters, choose the row action Install services of the target cluster. The wizard opens on its first step, Service.
-
Choose the service. On the Service step, select MySQL Community Server. The card shows the licence GPL-2.0-only. Pick the Method among podman, package (default podman). To register an existing mysql service of your organisation instead, turn on Use an existing external service.
-
Choose the hosts and the mode. On the Hosts step, tick the hosts, then choose the Mode: standalone (default), replication. Each mode deploys the components listed in Installation methods and modes.
-
Bindings. This service has no dependency: the Bindings step has nothing to bind.
-
Configure. On the Configure step, review the parameters (see Configuration parameters). Passwords left empty with a generated default are generated and sealed by the Manager.
-
Review and install. On the Install step the Manager validates the plan and shows the installation order; when it says "The plan is valid. Ready to install.", choose Install. A highly available mode is installed only when its HA checks pass.
-
Verify. The operation ends when the health checks of every instance pass (see Health checks); the service then shows as running in Services.
High availability
Topology per mode
| Modes | Highest catalog level | Distribution | Quorum component | Fault domains | Description |
|---|
standalone | standalone (standalone) | single (single) | - | 1 | One MySQL server. |
replication | ha (ha) | active-passive (active-passive) | - | 2 | One source and read only GTID replicas (asynchronous); promoting a replica is a manual operation. |
Notes
- The catalog mode is asynchronous GTID replication without automatic failover. Automatic failover needs InnoDB Cluster (Group Replication, MySQL Shell and MySQL Router, 3 or more members), which this mode does not deploy.
Configuration parameters
Network
| Parameter | Type | Default | Allowed values | Required | Secret | Restart | Description |
|---|
Port (port) | port | 3306 | - | no | no | no | TCP port of the SQL server. |
Tuning
| Parameter | Type | Default | Allowed values | Required | Secret | Restart | Description |
|---|
InnoDB buffer pool (innodb_buffer_pool_mb) | int | 1024 | min 128, MB | no | no | yes | InnoDB cache, about half of the host memory. (recommended clamp(round(host.memory_mb * 0.5), 256, 262144)) |
Maximum connections (max_connections) | int | 500 | min 20, max 100000 | no | no | no | Maximum number of client connections. |
Security
| Parameter | Type | Default | Allowed values | Required | Secret | Restart | Description |
|---|
Root password (root_password) | password | generated | - | no | yes | no | Password of root@localhost, used only by the operator commands. |
TLS (tls_enabled) | bool | false | - | no | no | yes | Serve the SQL port over TLS only (require_secure_transport) with the certificate issued by the manager CA; the replicas replicate over TLS and verify the source certificate. |
Replication password (replication_password) | password | generated | - | no | yes | no | Password of the replication user of the replicas. |
Endpoints
| Endpoint | Scheme | Component | Port | Path | TLS parameter | Binding parameters | Binding secrets | Provisioning command |
|---|
sql | mysql | mysqld | 3306 (port) | - | tls_enabled | database, username, tls | password | provision_consumer |
Commands
| Command | Component | Target | Description |
|---|
Provision a consumer database (provision_consumer) | mysqld | first host | Creates or updates the user and the database of one consumer service (idempotent). |
Start the replication (setup_replication) | mysqld | every host | Points every replica to the source with GTID auto positioning and starts it. |
Replica status (replica_status) | mysqld | every host | Runs SHOW REPLICA STATUS on every server. |
Process list (processlist) | mysqld | first host | Shows the running sessions. |
Command parameters
| Command | Parameter | Type | Default | Required | Description |
|---|
provision_consumer | Database (database) | string | - | yes | Database of the consumer. |
provision_consumer | User (username) | string | - | yes | User of the consumer. |
provision_consumer | Password (password) | password | - | yes | Password of the user (derived per consumer). |
Health checks
Liveness (per instance)
| Component | Check | Details |
|---|
mysqld | TCP {{ host.ip or '127.0.0.1' }}:{{ config.port }} | 90 retries; interval 2 s; timeout 3 s |
Readiness (service check)
| Check | Details |
|---|
TCP {{ host.ip or '127.0.0.1' }}:{{ config.port }} | - |
Preflight checks
| Check | Type | Meaning | Severity | Components |
|---|
memory | memory_mb {"min": 2048} | at least 2048 MB of memory | blocking | every component |
sql_port_free | port_free {"param": "port"} | port 3306 free on the host | blocking | every component |
Backup and restore
Consistent logical dump (mysqldump --single-transaction) of every database except the system schemas, taken on the first server (the primary of mode replication) and replayed with the mysql client (P5C-008, engines mysql_dump and mysql_restore). Accounts stay in the mysql schema of the server.
| |
|---|
| Format | mysql-dump |
| Component | mysqld |
| Files | {{ backup.dir }}/dump.sql |
| Restore test | no |
| Instances stopped for the restore | no |
Uninstall
Paths removed when the data is purged: {{ paths.data }}, {{ paths.log }}.
Upstream documentation