Skip to content

Fix magebox db commands failing with exit 127 on MariaDB 11.x - #142

Merged
peterjaap merged 2 commits into
mainfrom
copilot/fix-magebox-db-commands
Sep 1, 2026
Merged

Fix magebox db commands failing with exit 127 on MariaDB 11.x#142
peterjaap merged 2 commits into
mainfrom
copilot/fix-magebox-db-commands

Conversation

Copilot AI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

MariaDB 11.0+ removed the mysql/mysqldump/mysqladmin symlinks — only the native mariadb/mariadb-dump/mariadb-admin binaries exist. All db subcommands hardcoded the old names, causing OCI exec failures.

Changes

  • internal/docker/compose.go — adds DBClientBin(dbType, version) and DBDumpBin(dbType, version) as the single source of truth for binary selection; updates CreateDatabase and DatabaseExists to accept a clientBin parameter instead of hardcoding "mysql"

  • cmd/magebox/db.go — adds clientBin(), dumpBin(), adminBin() methods on dbInfo, each delegating to the shared helpers; replaces all 12 hardcoded binary references throughout db import, db export, db shell, db create, db drop, db reset, db top, db snapshot create/restore

  • internal/project/lifecycle.go, cmd/magebox/check.go — updated call sites pass the version-resolved binary name

  • internal/docker/compose_test.go — table-driven tests for DBClientBin/DBDumpBin across MySQL and MariaDB 10.x/11.x/12.x

mariadb 10.6 → mysql / mysqldump / mysqladmin   (unchanged)
mariadb 11.0 → mariadb / mariadb-dump / mariadb-admin
mariadb 11.4 → mariadb / mariadb-dump / mariadb-admin
mysql   8.x  → mysql / mysqldump / mysqladmin   (unchanged)

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📦 PR build artifacts

Built from 1bd07b5view run. Artifacts expire in 14 days.

Note: artifact download links require being signed in to GitHub with access to this repository.

…riadb-admin binaries (#122)

Co-authored-by: peterjaap <431360+peterjaap@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix magebox db commands for MariaDB 11.x Fix magebox db commands failing with exit 127 on MariaDB 11.x Sep 1, 2026
Copilot AI requested a review from peterjaap September 1, 2026 08:45
@peterjaap
peterjaap marked this pull request as ready for review September 1, 2026 08:52
@peterjaap
peterjaap merged commit 720f891 into main Sep 1, 2026
12 checks passed
@peterjaap
peterjaap deleted the copilot/fix-magebox-db-commands branch September 1, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants