Skip to content

MariaDB version mixup between database and application service #88

Description

@com2
name: mixup
recipe: wordpress
config:
  webroot: wp
services:
  appserver:
    type: php:8.2
    scanner: false
  database:
    type: mariadb:10.11.7

When I do a lando rebuild -y I see among other things the following feedback text:

MySQL binary:   /usr/bin/mysql
MySQL version:  mysql  Ver 15.1 Distrib 10.5.26-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper

Please note that Distrib 10.5.25-MariaDB is not conform the set version in .lando.yml. Then when I do lando ssh -s database I can discover the following:

www-data@d5032670b3e3:/app$ whereis mysql
mysql: /opt/bitnami/mariadb/bin/mysql
www-data@d5032670b3e3:/app$ mysql --version
mysql  Ver 15.1 Distrib 10.11.7-MariaDB, for Linux (x86_64) using readline 5.1

It means the correct mysql command is there in the database service but the one in appserver service is in /usr/bin/ and not the same version. Shouldn't that be the database container version as well? Shouldn't same version tools be used to avoid conflicts?

In search of a work around I did ... :

www-data@d5032670b3e3:/app$ exit
com2@dell:~/mixup$ lando ssh -s appserver
www-data@5407ce1128ea:/app$ ls /opt/bitnami/mariadb/bin/mysql
ls: cannot access '/opt/bitnami/mariadb/bin/mysql': No such file or directory

... in the hope it could accessed in the appserver service where I run all my database related scripts and were also php, wp-cli that all rely on each other and mariadb. Shouldn't there be a symlink from /usr/bin/mysql->/opt/bitnami/mariadb/bin/mariadb. All /opt/bitnami/mariadb/bin tools should be symlinked from /usr/bin and made available in the appserver because there they are used.

Until this is fixed, can someone recommend me a workaround? How can /opt/bitnami/mariadb/bin be made available in the appserver service?

May be this is an issue in other recipes but I had no time to test them all. May be this is a systematic error for all database types?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions