Skip to content

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

Description

@AaronFeledy

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions