Skip to content

"magebox db" commands fail with exit status 127 on MariaDB 11.x — "mysql" binary removed #122

Description

@mercurieus

Bug

All magebox db subcommands (e.g. db shell, db drop, db create) fail when using MariaDB 11.x because they call mysql inside the container, which no longer exists.

Error

OCI runtime exec failed: exec failed: unable to start container process: exec: "mysql": executable file not found in $PATH
Error: exit status 127

Root cause

MariaDB 11.0+ removed the mysql binary alias. The only client binary available is now mariadb.

References

Steps to reproduce

  1. Set mariadb: "11.4" in .magebox.yaml
  2. Run magebox db shell (or db drop, db create)

Expected behaviour

Commands work — MageBox should call mariadb instead of mysql when mysql is not present in the container.

Suggested fix

Use mariadb as the exec command for MariaDB 11.x containers, or probe with which mariadb mysql and use whichever is available.

Environment

  • MageBox: v1.17.0
  • MariaDB image: mariadb:11.4
  • Platform: macOS arm64

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