Skip to content

Instantly share code, notes, and snippets.

@andrewsantarin
Last active July 25, 2018 18:50
Show Gist options
  • Save andrewsantarin/78262ed2319297fca5063123cd53393a to your computer and use it in GitHub Desktop.
Save andrewsantarin/78262ed2319297fca5063123cd53393a to your computer and use it in GitHub Desktop.
  1. Follow this: https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe13.

    Note: mysql is already at v8.0.11 as of this point of writing, so make sure you explicitly install v5.7 by replacing mysql with mysql@5.7.

  2. Create a new entry into your PATH environment as the postinstall note suggests:

    # Edit the Terminal startup configuration file.
    open ~/.bash_profile
    
    # Copy this into the file and save.
    export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
    
    # Apply the new Terminal startup configuration.
    source ~/.bash_profile
    
  3. Run mysql_secure_installation now that it's an available command.


Troubleshooting

  • Was the latest version of MySQL installed by mistake? Uninstall it.
brew uninstall mysql
brew cleanup
sudo rm -rf /usr/local/var/mysql
sudo rm /etc/my.cnf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment