mySQL Homebrew - Couldn't connect to host

After wiping my mac and starting fresh, I was having issues trying to install mySQL via homebrew. The connection to the download server kept timing out.

$ brew install mysql
==> Downloading

curl: (7) couldn't connect to host
Error: Download failed:

As it turns out, doesn’t exist any more, so you’ll need to grab it from somewhere else and move it to the Homebrew cache directory. The following bit of code will do it for you:

curl > mysql-5.5.15.tar.gz
mv mysql-5.5.15.tar.gz `brew --cache`
brew install mysql

This downloads the code from another location and moves it into the Homebrew cache path, meaning that the recipe can find the source. You’ll need to make sure that you’re grabbing the correct version (5.5.15 at the time of writing), or homebrew might kick up a fuss.

October 09, 2011

Quick Fix