Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MariaDB version mixup between database and application service #88

Open
com2 opened this issue Nov 20, 2024 · 1 comment
Open

MariaDB version mixup between database and application service #88

com2 opened this issue Nov 20, 2024 · 1 comment

Comments

@com2
Copy link

com2 commented Nov 20, 2024

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?

@com2 com2 added the wordpress label Nov 20, 2024
@rtfm-47 rtfm-47 transferred this issue from lando/lando Nov 20, 2024
@com2
Copy link
Author

com2 commented Nov 20, 2024

I just read that MariaDB version 10.11.7 not officially supported but I did try the same with the supported version 10.11 with the same result.

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

No branches or pull requests

2 participants