Skip to content

Enforce mysql-client as a required dependency for magerun2 support#114

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/add-mysql-client-dependency
Draft

Enforce mysql-client as a required dependency for magerun2 support#114
Copilot wants to merge 3 commits into
mainfrom
copilot/add-mysql-client-dependency

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

magerun2 database commands (db:info, db:dump, etc.) require mysql/mysqldump on PATH, but MageBox never checked for or installed mysql-client, causing silent failures.

Changes

Dependency detection

  • Added MysqlClientInstallCommand() to Platform with per-distro install commands (Homebrew/apt/dnf/pacman)

Installer interface & implementations

  • Added InstallMysqlClient() to the Installer interface and implemented across all platforms:
    • macOS: brew install mysql-client
    • Ubuntu/Debian: default-mysql-client
    • Fedora: community-mysql
    • Arch: mariadb-clients

magebox bootstrap (Step 1)

  • Checks for mysqldump on PATH alongside Docker/Nginx/mkcert
  • Includes mysql-client in the missing-deps prompt and auto-installs with user consent
  • On macOS, outputs a shell-aware note since mysql-client is a keg-only Homebrew formula:
    Note: mysql-client is keg-only on macOS. To add it to your PATH:
        echo 'export PATH="$(brew --prefix mysql-client)/bin:$PATH"' >> ~/.zshrc
    

magebox check

  • Added a mysql-client check in the magerun2 section that reports mysqldump availability and surfaces the install command on failure:
    ✗ mysql-client:       Not installed — run 'brew install mysql-client'
    

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • github.com (HTTP Only)
    • Triggering command: /usr/bin/ssh /usr/bin/ssh -o SendEnv=GIT_PROTOCOL git@github.com git-upload-pack 'org/repo.git' (packet block)
  • nonexistent.invalid.host
    • Triggering command: /tmp/go-build2023940910/b374/teamserver.test /tmp/go-build2023940910/b374/teamserver.test -test.testlogfile=/tmp/go-build2023940910/b374/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add mysql-client as a required dependency for magerun2 Enforce mysql-client as a required dependency for magerun2 support May 12, 2026
Copilot AI requested a review from peterjaap May 12, 2026 08:20
Comment thread cmd/magebox/bootstrap.go
// Re-check after installation
nginxInstalled = p.IsNginxInstalled()
mkcertInstalled = platform.CommandExists("mkcert")
mysqlClientInstalled = platform.CommandExists("mysqldump")
* main:
  Upload PR build binaries as artifacts and comment links
  Release v1.17.0
  Start only this project's services on magebox start
  Ensure installation directory exists before installation (#113)
@github-actions
Copy link
Copy Markdown
Contributor

📦 PR build artifacts

Built from 2b83fd4view run. Artifacts expire in 14 days.

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

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.

mysql-client not enforced as a dependency, causing magerun2 failures

2 participants