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