Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Uninstall all those broken versions of MySQL and re-install it with Brew on Mac Mavericks
- # Remove MySQL completely:
- 01. ps -ax | grep mysql
- 02. kill -9 `ps -ax | grep mysql | awk '{print $1}'`
- 03. brew remove mysql
- 04. brew cleanup
- 05. sudo rm /usr/local/mysql
- 06. sudo rm -rf /usr/local/var/mysql
- 07. sudo rm -rf /usr/local/mysql*
- 08. sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
- 09. sudo rm -rf /Library/StartupItems/MySQLCOM
- 10. sudo rm -rf /Library/PreferencePanes/My*
- 11. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
- 12. nano /etc/hostconfig --remove the line "MYSQLCOM=-YES-"
- 13. rm -rf ~/Library/PreferencePanes/My*
- 14. sudo rm -rf /Library/Receipts/mysql*
- 15. sudo rm -rf /Library/Receipts/MySQL*
- 16. sudo rm -rf /private/var/db/receipts/*mysql*
- #-- Apparently the receipts are in a different location for the newer versions of MySQL
- #-- so line #16 was added to clean them out as well. Remember, these steps will completely
- #-- Remove MySQL and any data residing in the default locations.
- # Restart your computer just to ensure any MySQL processes are killed ###Try to run mysql, it shouldn't work
- # Brew install MySQL per user:
- 01. brew doctor and fix any errors
- 02. brew update
- 03. brew install mysql
- 04. unset TMPDIR
- 05. mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
- 06. mysql.server start
- #-- Run the commands Brew suggests, add MySQL to launchctl so it automatically launches at startup.
- #-- mysql should now work and be running all the time as expected
Advertisement
Add Comment
Please, Sign In to add comment