Repository navigation
fix: MariaDB --defaults-file TLS/SSL error (Drush sql:*) - #253
Open
AaronFeledy wants to merge 4 commits into
Open
AaronFeledy wants to merge 4 commits into
AaronFeledy wants to merge 4 commits into
Conversation
Co-authored-by: Aaron Feledy <AaronFeledy@users.noreply.github.com>
✅ Deploy Preview for lando-php ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: Aaron Feledy <AaronFeledy@users.noreply.github.com>
# Conflicts: # CHANGELOG.md
…non-TLS MariaDB 10.6
AaronFeledy
marked this pull request as ready for review
December 3, 2026 17:35
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.

MariaDB 11 clients require TLS by default.
lando.cnfalready setsdisable-ssl-verify-server-cert, but callers that pass--defaults-file(Drushsql:*,site:install) skip it and fail against non-TLS servers with:ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support itmariadb-compat-install.shnow installs/usr/local/binwrappers formariadb,mariadb-admin,mariadb-dump,mariadb-check,mariadb-importandmariadb-show. Each wrapper keeps any leading--no-defaults,--print-defaultsand--defaults-*=args first, then adds--skip-ssl-verify-server-cert, then the caller's args. The existingmysql*name wrappers resolve to these. A wrapper is only written when the client's--helplists--ssl-verify-server-cert, and the script only runs for MariaDB clients, so MySQL clients are untouched. Rebuild-only.The
db-clientexample adds a MariaDB 10.6 service (no TLS), confirms the bare client fails withERROR 2026via--defaults-file, and checks that the wrappedmariadb,mysql,mariadb-dump,mysqldumpandmariadb-adminconnect.Closes #252
Note
Medium Risk
Changes how MariaDB CLI binaries behave in PHP containers (database access and tooling like Drush); scope is limited to MariaDB client install and requires a rebuild.
Overview
Fixes MariaDB 11 client
ERROR 2026when CLI tools use--defaults-fileand skiplando.cnf—a common path for Drushsql:*against local non-TLS MariaDB servers.mariadb-compat-install.shnow installs/usr/local/binwrappers formariadb,mariadb-admin,mariadb-dump, and related binaries. Each wrapper keeps leading--defaults-*/--no-defaultsarguments in order, then adds--skip-ssl-verify-server-cert, then forwards the rest of the argv. Wrappers are only created when--helpadvertises SSL verify options; existingmysql*→mariadb*name aliases still apply and pick up the wrapped clients via PATH.Docs and examples note the TLS caveat, changelog entry for #252, and the db-client example adds a MariaDB 10.6 (no TLS) service plus checks that bare
/usr/bin/mariadb --defaults-filefails while wrapped clients succeed.Reviewed by Cursor Bugbot for commit c494170. Bugbot is set up for automated code reviews on this repo. Configure here.