Install MySQL

Mac OS

kill -kill `pgrep mysql`
brew deps mysql | xargs brew remove --ignore-dependencies && brew missing | xargs brew install
brew remove mysql
brew autoremove
brew cleanup
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
sudo rm -rf /usr/local/var/mysql
myShell=`echo $SHELL`
if [[ "$myShell" == *"zsh"* ]]; then
  profile=`echo "~/.zshrc"`
elif [[ "$myShell" == *"bash"* ]]; then
    profile=`echo "~/.bashrc"`
fi
echo 'export PATH="/usr/local/var/mysql/bin:$PATH"' >> $profile
source $profile
brew cleanup
kill -kill `pgrep mysql`
mysqld --initialize --explicit_defaults_for_timestamp
mysql.server start
brew services restart mysql
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
brew services start mysql