Skip to content

Instantly share code, notes, and snippets.

@etipton
Created August 11, 2016 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etipton/d499bc505e0156af8b6fac281e600bcc to your computer and use it in GitHub Desktop.
Save etipton/d499bc505e0156af8b6fac281e600bcc to your computer and use it in GitHub Desktop.
Upgrade brew-installed mysql from 5.6.22 to 5.7.11
  1. $ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist (stop mysql)
  • $ brew update
  • $ cd /usr/local/Library/Formula/
  • $ git checkout deff2feda710790d62aeb54286c097a6d991b3f1 (contains 5.7.11 build)
    • (may need to do a $ git pull origin master --unshallow first)
  • $ brew upgrade mysql
  • Apply server args:
    • NOTE: In general, always make sure you trust the source and don't "blindly" run files you download via curl.
    • $ ruby <(curl -s https://gist.githubusercontent.com/etipton/8dead5a3397f6bd7edb2/raw) (source code)
  • $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist (start mysql)
  • $ mysql_upgrade -uroot --force
  • Restart mysql so effects of mysql_upgrade are applied:
    • $ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist (stop mysql)
    • $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist (start mysql)
  • $ git checkout master (reset homebrew-core back to latest and greatest)
  • $: cd [your projects dir, e.g. ~/projects]/my.rigor.com
  • Re-install mysql gem:
    • $ gem uninstall mysql
    • $ bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment