From 7f22e2d9e534882cc3f532502e2d8f7cca2c5848 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Thu, 19 Feb 2026 17:16:36 -0600 Subject: [PATCH 1/2] test: add MySQL 5.7 SSL connectivity test for Backdrop recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reproduces lando/lando#3833 — Backdrop recipe with MySQL 5.7 where mysql/mysqldump commands from the appserver fail with TLS/SSL errors due to self-signed certificates. --- .github/workflows/pr-backdrop-tests.yml | 1 + examples/backdrop-mysql57/.lando.yml | 10 ++++ examples/backdrop-mysql57/README.md | 74 +++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 examples/backdrop-mysql57/.lando.yml create mode 100644 examples/backdrop-mysql57/README.md diff --git a/.github/workflows/pr-backdrop-tests.yml b/.github/workflows/pr-backdrop-tests.yml index 24ed37c..a5d5c13 100644 --- a/.github/workflows/pr-backdrop-tests.yml +++ b/.github/workflows/pr-backdrop-tests.yml @@ -22,6 +22,7 @@ jobs: - examples/backdrop-mariadb - examples/backdrop-mysql8 - examples/backdrop-mysql-client + - examples/backdrop-mysql57 - examples/backdrop-nginx lando-version: - 3-edge diff --git a/examples/backdrop-mysql57/.lando.yml b/examples/backdrop-mysql57/.lando.yml new file mode 100644 index 0000000..2e0b07a --- /dev/null +++ b/examples/backdrop-mysql57/.lando.yml @@ -0,0 +1,10 @@ +name: backdrop-mysql57 +recipe: backdrop +config: + php: '8.4' + database: mysql:5.7 + webroot: web + +# do not remove this +plugins: + "@lando/backdrop": ../.. diff --git a/examples/backdrop-mysql57/README.md b/examples/backdrop-mysql57/README.md new file mode 100644 index 0000000..4edb96f --- /dev/null +++ b/examples/backdrop-mysql57/README.md @@ -0,0 +1,74 @@ +# Backdrop MySQL 5.7 SSL Test + +This example tests that the backdrop recipe with MySQL 5.7 correctly handles +database client connectivity. MySQL 5.7 uses self-signed certificates that can +cause TLS/SSL errors with the MySQL 8.0 client. + +See: https://github.com/lando/lando/issues/3833 + +## Start up tests + +Run the following commands to get up and running with this example. + +```bash +# Should download and extract Backdrop +lando poweroff +rm -rf web && mkdir -p web +curl -fsSL https://github.com/backdrop/backdrop/releases/download/1.33.1/backdrop.zip -o /tmp/backdrop.zip +unzip -q /tmp/backdrop.zip -d web +mv web/backdrop/* web/backdrop/.* web/ 2>/dev/null || true +rmdir web/backdrop 2>/dev/null || true +``` + +```bash +# Should start up successfully +lando start +``` + +```bash +# Should install Backdrop with bee +cd web && chmod +x core/scripts/* +lando bee site-install --db-name=backdrop --db-user=backdrop --db-pass=backdrop --db-host=database --username=admin --password=admin --email=test@lando.dev --site-name="MySQL 5.7 Test" --auto +``` + +## Verification commands + +Run the following commands to validate things are rolling as they should. + +```bash +# Should auto-detect MySQL and install the MySQL client (not MariaDB) +lando exec appserver -- mysql --version | grep -qiv "MariaDB" +``` + +```bash +# Should be able to connect to MySQL 5.7 without SSL errors +lando mysql backdrop -e "SELECT 1" +``` + +```bash +# Should be able to run mysql from appserver without SSL errors +lando exec appserver -- mysql -h database -u backdrop -pbackdrop backdrop -e "SELECT 1" +``` + +```bash +# Should be able to export with bee without SSL errors +cd web +lando bee db-export /tmp/bee-export.sql +lando exec appserver -- bash -c "zcat /tmp/bee-export.sql.gz | head -5" | grep -i "dump" +``` + +```bash +# Should be able to export with db-export without SSL errors +lando db-export --stdout > /tmp/lando-export.sql +head -5 /tmp/lando-export.sql | grep -i "dump" +``` + +## Destroy tests + +Run the following commands to trash this app like nothing ever happened. + +```bash +# Should be destroyed with success +lando destroy -y +lando poweroff +``` From d9a60833bf6a264c80ea3a30bf41abaf928ec62e Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Thu, 19 Feb 2026 18:48:01 -0600 Subject: [PATCH 2/2] test: use bare 'database: mysql' with no version to match user's scenario The reporter used the default MySQL version (no version pinned), which is the more realistic test case. --- examples/backdrop-mysql57/.lando.yml | 2 +- examples/backdrop-mysql57/README.md | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/backdrop-mysql57/.lando.yml b/examples/backdrop-mysql57/.lando.yml index 2e0b07a..088fed1 100644 --- a/examples/backdrop-mysql57/.lando.yml +++ b/examples/backdrop-mysql57/.lando.yml @@ -2,7 +2,7 @@ name: backdrop-mysql57 recipe: backdrop config: php: '8.4' - database: mysql:5.7 + database: mysql webroot: web # do not remove this diff --git a/examples/backdrop-mysql57/README.md b/examples/backdrop-mysql57/README.md index 4edb96f..1fc7fca 100644 --- a/examples/backdrop-mysql57/README.md +++ b/examples/backdrop-mysql57/README.md @@ -1,8 +1,9 @@ -# Backdrop MySQL 5.7 SSL Test +# Backdrop MySQL Default Version SSL Test -This example tests that the backdrop recipe with MySQL 5.7 correctly handles -database client connectivity. MySQL 5.7 uses self-signed certificates that can -cause TLS/SSL errors with the MySQL 8.0 client. +This example tests that the backdrop recipe with `database: mysql` (no version +specified, using whatever the default is) correctly handles database client +connectivity. This matches the real-world scenario where users just set +`database: mysql` without pinning a version. See: https://github.com/lando/lando/issues/3833 @@ -28,7 +29,7 @@ lando start ```bash # Should install Backdrop with bee cd web && chmod +x core/scripts/* -lando bee site-install --db-name=backdrop --db-user=backdrop --db-pass=backdrop --db-host=database --username=admin --password=admin --email=test@lando.dev --site-name="MySQL 5.7 Test" --auto +lando bee site-install --db-name=backdrop --db-user=backdrop --db-pass=backdrop --db-host=database --username=admin --password=admin --email=test@lando.dev --site-name="MySQL Default Test" --auto ``` ## Verification commands