Skip to content

Instantly share code, notes, and snippets.

@tiagogeraldi
Last active July 18, 2017 17:55
Show Gist options
  • Save tiagogeraldi/7330243e95241846c84dbbdd3ca25fcf to your computer and use it in GitHub Desktop.
Save tiagogeraldi/7330243e95241846c84dbbdd3ca25fcf to your computer and use it in GitHub Desktop.
Downgrade MySQL 5.7 to 5.6 and update gem mysql2
#Environment:
#- Macos Sierra 10.12.5
#- Ruby 2.2.0 (rbenv)
$ brew uninstall mysql
$ rm -rf /usr/local/mysql # Warning: IT DELETES ALL DBs
$ brew install mysql56
$ brew services start mysql56
$ gem uninstall mysql2
$ gem install mysql2 -v 0.4.4 -- --with-mysql-config=/usr/local/Cellar/[email protected]/5.6.36_1/bin/mysql_config --with-ldflags=/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include
# stop spring if you are using that
$ cd /your-rails-project
$ bin/spring stop
$ bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment