-
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 replacingmysql
with[email protected]
. -
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/[email protected]/bin:$PATH" # Apply the new Terminal startup configuration. source ~/.bash_profile
-
Run
mysql_secure_installation
now that it's an available command.
- Was the latest version of MySQL installed by mistake? Uninstall it.
brew uninstall mysql
brew cleanup
- Did MySQL postinstall fail? Clear all MySQL local data.
sudo rm -rf /usr/local/var/mysql
sudo rm /etc/my.cnf
- Additional reading?