lando / lando/php

MariaDB 11 client TLS breaks Drush/--defaults-file (ERROR 2026)

Open
#252 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
20
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Problem

MariaDB 11.x clients (common in PHP 8.4 appserver images) require TLS by default. Local Lando DB services usually have no TLS, so CLI tools fail with:

ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support it

scripts/mariadb-compat-install.sh already writes /etc/mysql/conf.d/lando.cnf with disable-ssl-verify-server-cert, which fixes interactive mysql/mariadb and PHP PDO/mysqli. It does not help tools that pass --defaults-file (notably Drush sql:* / site:install), because that flag ignores other client config files.

Reproduced on Pantheon recipe + PHP 8.4 + MariaDB 10.6 server; lando drush site-install fails on drop/create while plain mariadb without --defaults-file works. Related meta: lando/lando#3833.

Proposed fix

Extend MariaDB compat install with PATH argv wrappers for mariadb/mariadb-* that append --skip-ssl-verify-server-cert when the client supports that flag (gate on client capability, not server version). Rebuild-only; no Landofile or per-project Drush config required.

Workaround (until fixed)

Per-project drush.yml:

command:
  sql:
    '*':
      options:
        extra: '--skip-ssl-verify-server-cert'

Or DRUSH_COMMAND_SITE_INSTALL_OPTIONS_EXTRA=--skip-ssl-verify-server-cert for site-install only.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scripts/mariadb-compat-install.sh and trace how its /etc/mysql/conf.d/lando.cnf is installed and how PATH commands are selected. Verify the wrapper only adds the option when the mariadb client supports it, then reproduce plain-client and --defaults-file/Drush-style invocations against a non-TLS MariaDB service.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, mariadb, php
Domain
databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.