Skip to content

Instantly share code, notes, and snippets.

@flanger001
Last active April 13, 2022 12:51
Show Gist options
  • Save flanger001/0ccfddb26fba4579d07fc313c02338e9 to your computer and use it in GitHub Desktop.
Save flanger001/0ccfddb26fba4579d07fc313c02338e9 to your computer and use it in GitHub Desktop.
Installing MySQL on macOS
MySQL
If the mysql2 gem fails to install, be sure your Xcode Command Line Tools are installed:
$ xcode-select --install
Then try reinstalling the gem with either of these 3 commands:
$ gem install mysql2 -- \
--with-cflags=\"-I$(brew --prefix)/opt/openssl/include\" \
--with-ldflags=\"-L$(brew --prefix)/opt/openssl/lib\"
$ gem install mysql2 -- --with-mysql-dir=$(dirname $(dirname $(which mysql)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment