Skip to content

Instantly share code, notes, and snippets.

@vt-rli
Created September 18, 2025 15:07
Show Gist options
  • Select an option

  • Save vt-rli/f2cf369f759f6e58d0809a5f927863bf to your computer and use it in GitHub Desktop.

Select an option

Save vt-rli/f2cf369f759f6e58d0809a5f927863bf to your computer and use it in GitHub Desktop.
Install MySQL 5.7 on macOS 26(Tahoe) using Homebrew

It is now September 18, 2025, three days after the release of macOS 26 (Tahoe). Due to a few legacy projects, I still need to use MySQL 5.7 in 2025.

Homebrew has long since dropped support for MySQL 5.7. The old method of installing via brew tap homebrew/core --force and then modifying mysql@5.7.rb no longer works, and brew edit mysql@5.7 is also broken.

Thanks to ferrucc-io's reply, I refined and tested the steps myself and got MySQL 5.7.44 up and running on macOS 26.

For anyone who runs into the same issue, I’m documenting here:

brew tap homebrew/core --force
curl -fL "https://raw.githubusercontent.com/Homebrew/homebrew-core/6c907880b95a3702348c1fcce1c661fcc03336e5/Formula/m/mysql%405.7.rb"  -o "/opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/m/mysql@5.7.rb"
sed -i '' '/disable! date: "2024-08-01", because: :unsupported/d' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/m/mysql@5.7.rb
curl -fL "https://raw.githubusercontent.com/Homebrew/homebrew-core/6c907880b95a3702348c1fcce1c661fcc03336e5/Formula/o/openssl%401.1.rb"   -o "/opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/o/openssl@1.1.rb"
sed -i '' '/disable! date: "2024-10-24", because: :unsupported/d' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/o/openssl@1.1.rb

brew tap-new local/old-openssl
cp /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/o/openssl@1.1.rb \
   $(brew --repository local/old-openssl)/Formula/openssl@1.1.rb
brew install local/old-openssl/openssl@1.1

brew tap-new local/old-mysql
cp /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/m/mysql@5.7.rb \
   $(brew --repository local/old-mysql)/Formula/mysql@5.7.rb
brew install local/old-mysql/mysql@5.7

echo 'export PATH="/opt/homebrew/opt/mysql@5.7/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
brew services start local/old-mysql/mysql@5.7

mysql_secure_installation

@MasterLee90

Copy link
Copy Markdown

macos26 still not supported

@dmk1111

dmk1111 commented Jun 16, 2026

Copy link
Copy Markdown

Just tried with MacOS 26.5.1 - on step brew install local/old-mysql/mysql@5.7 I receive no_autobump! can only be used in official Homebrew taps
Homebrew now rejects no_autobump! in non-official taps, which is exactly why local/old-mysql fails. The guide removes only disable!, but the raw MySQL formula also contains no_autobump!.
Run this after copying the MySQL formula into your local tap, before brew install:

MYSQL_FORMULA="$(brew --repository local/old-mysql)/Formula/mysql@5.7.rb"

sed -i '' '/^[[:space:]]*no_autobump!.*$/d' "$MYSQL_FORMULA"

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