Skip to main content

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​

Version8.4.5
Useinstall and configure
Layerinfrastructure (shown apart)
CategoryData platforms
Installation methodspodman, package
External connectionmysql
Sandbox onlyno

Licence​

SPDX identifierGPL-2.0-only
Licence policylicence exception
Licence exceptionLEX-003 (pending, awaiting the client)
Platform componentmysql

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.

KindPackageVersionLicenceDetails
container imagedocker.io/library/mysql8.4.5GPL-2.0-onlyimage key mysql, used by mysqld, digest sha256:679e7e924f38a3cbb62a3d7df32924b83f7321a602d3f9f967c01b3df18495d6
OS packagemysql-community-serverversion of the configured repositoryGPL-2.0-onlyRHEL family (dnf)
OS packagemysql-community-clientversion of the configured repositoryGPL-2.0-onlyRHEL family (dnf)
OS packagemysql-serverversion of the configured repositoryGPL-2.0-onlyDebian family (apt)
OS packagemysql-clientversion of the configured repositoryGPL-2.0-onlyDebian 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​

MethodOperating systemsArchitectures
podmanRHEL family (dnf), Debian family (apt), Arch Linux (pacman)x86_64, aarch64 (not restricted by the descriptor)
packageRHEL 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​

ComponentPort namePortOpened in the host firewall
mysqldsql3306/tcpyes

Services and connections needed​

This service has no dependency.

Installation methods and modes​

MethodDefaultWhat the method uses
podmanyesthe 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​

ComponentKindInstallation methodsPorts
MySQL server (mysqld)masterpodman, package3306/tcp

Single server (standalone) (default)​

One MySQL server.

What the mode deploys:

ComponentPlacement
mysqldmin 1, max 1

GTID replication (replication)​

The first host is the source, the other hosts are read only GTID replicas.

What the mode deploys:

ComponentPlacement
mysqldmin 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.

  1. Open the wizard. In Clusters, choose the row action Install services of the target cluster. The wizard opens on its first step, Service.

  2. 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.

  3. 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.

  4. Bindings. This service has no dependency: the Bindings step has nothing to bind.

  5. 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.

  6. 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.

  7. 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​

Clusterreplicas (replication)
High availabilityredundancy (redundancy)
Failoverclient side (client)
Replicationnative (native)
Quorumnone (none)
Discoverystatic (static)
Entry pointclient discovery (client-discovery)
Official documentationhttps://dev.mysql.com/doc/mysql-shell/8.4/en/deploying-production-innodb-cluster.html
Peer TLS parametertls_enabled
Cluster status commandreplica_status

Topology per mode​

ModesHighest catalog levelDistributionQuorum componentFault domainsDescription
standalonestandalone (standalone)single (single)-1One MySQL server.
replicationha (ha)active-passive (active-passive)-2One 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​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Port (port)port3306-nononoTCP port of the SQL server.

Tuning​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
InnoDB buffer pool (innodb_buffer_pool_mb)int1024min 128, MBnonoyesInnoDB cache, about half of the host memory. (recommended clamp(round(host.memory_mb * 0.5), 256, 262144))
Maximum connections (max_connections)int500min 20, max 100000nononoMaximum number of client connections.

Security​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Root password (root_password)passwordgenerated-noyesnoPassword of root@localhost, used only by the operator commands.
TLS (tls_enabled)boolfalse-nonoyesServe 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)passwordgenerated-noyesnoPassword of the replication user of the replicas.

Endpoints​

EndpointSchemeComponentPortPathTLS parameterBinding parametersBinding secretsProvisioning command
sqlmysqlmysqld3306 (port)-tls_enableddatabase, username, tlspasswordprovision_consumer

Commands​

CommandComponentTargetDescription
Provision a consumer database (provision_consumer)mysqldfirst hostCreates or updates the user and the database of one consumer service (idempotent).
Start the replication (setup_replication)mysqldevery hostPoints every replica to the source with GTID auto positioning and starts it.
Replica status (replica_status)mysqldevery hostRuns SHOW REPLICA STATUS on every server.
Process list (processlist)mysqldfirst hostShows the running sessions.

Command parameters​

CommandParameterTypeDefaultRequiredDescription
provision_consumerDatabase (database)string-yesDatabase of the consumer.
provision_consumerUser (username)string-yesUser of the consumer.
provision_consumerPassword (password)password-yesPassword of the user (derived per consumer).

Health checks​

Liveness (per instance)​

ComponentCheckDetails
mysqldTCP {{ host.ip or '127.0.0.1' }}:{{ config.port }}90 retries; interval 2 s; timeout 3 s

Readiness (service check)​

CheckDetails
TCP {{ host.ip or '127.0.0.1' }}:{{ config.port }}-

Preflight checks​

CheckTypeMeaningSeverityComponents
memorymemory_mb {"min": 2048}at least 2048 MB of memoryblockingevery component
sql_port_freeport_free {"param": "port"}port 3306 free on the hostblockingevery 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.

Formatmysql-dump
Componentmysqld
Files{{ backup.dir }}/dump.sql
Restore testno
Instances stopped for the restoreno

Uninstall​

Paths removed when the data is purged: {{ paths.data }}, {{ paths.log }}.

Upstream documentation​