Repository navigation
Update MariaDB to 11.8 - #1699
Merged
Merged
Conversation
MariaDB 11.8 is the newest LTS with the longest support window (to Feb 2030). 10.11 has no packages for Ubuntu 26.04 or Debian 13. - Remove apt sources for other MariaDB versions so a version change doesn't leave both repositories configured - Run mariadb-upgrade after install. The package's own upgrade check can't log in once Trellis sets a root password, which left system tables on the old version after a major upgrade - Keep utf8mb4_general_ci as the default for tables created without a collation, so dumps still import into MySQL and older MariaDB - Quote mariadb_version so versions like 10.10 aren't parsed as floats Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the default MariaDB version from 10.11 to 11.8, the LTS release with the longest support window (until Feb 2030). MariaDB 10.11 has no packages for Ubuntu 26.04 (#1663) or Debian 13, so both need this change.
Changes
mariadb_version: "11.8": quoted so versions like10.10aren't parsed as the float10.1.apt_repositorynames the sources file after the URL, which includes the version, so the previous bump (⬆️ Update MariaDB to 10.11 #1520) left the old and new repositories configured side by side.mariadb-upgradeafter install. MariaDB's packages try to run it on service start via/etc/mysql/debian-start, but that logs in as root without a password, which fails once Trellis sets a root password (FATAL ERROR: Upgrade failedin the journal). After a major upgrade the server ran 11.8 with system tables still marked 10.11. The new task is a no-op when the tables are already current.utf8mb4_general_cias the default for tables created with a charset but no collation. MariaDB 11.2+ mapsutf8mb4toutf8mb4_uca1400_ai_civiacharacter_set_collations, even whencollation-serveris set. WordPress core tables aren't affected because core always setsutf8mb4_unicode_520_ci, but plugin tables created with onlyDEFAULT CHARSET utf8mb4would getuca1400, and dumps containing it can't be imported into MySQL or older MariaDB. This setting is only rendered for 11.2+.Existing servers
With the default
apt_package_state: present, provisioning an existing server switches the repo to 11.8 but does not upgrade the installed 10.11 packages. To upgrade, back up the database first, then run:To stay on 10.11, set
mariadb_version: "10.11"ingroup_vars.Testing
Tested on an Ubuntu 24.04 Lima VM with a restored WordPress database:
master(10.11.19), then provisioned this branch with the package states set tolatest. The server went to 11.8.9,mariadb-upgraderan (mariadb_upgrade_inforeads 11.8.9),mariadb-check --all-databasesreported every table OK, the 10.11 sources file was removed, and the front end and wp-login returned 200.mariadbrole changed nothing.DEFAULT CHARSET utf8mb4and no collation gotutf8mb4_general_ci(it gotutf8mb4_uca1400_ai_cibefore this change).pytest tests/templatesand the playbook syntax checks pass.A fresh install on 11.8 is covered by the integration workflow.
🤖 Generated with Claude Code