"Cannot load from mysql.procs_priv. The table is probably corrupted" on Osx / homebrew
I think it will be better to use this:
mysql_upgrade -u root -p
Enter your password and wait a few seconds.
Completely removing mysql and reinstalling it worked (less than 15 mins).
1. UNINSTALL AND PURGE MYSQL FROM SYSTEM
- Back up databases.
- Stop and kill any MySQL processes. Check for processes with
ps -ax | grep mysql
Uninstall mysql
brew remove mysql brew cleanup
Remove all the residual files
sudo rm /usr/local/mysql sudo rm -rf /usr/local/var/mysql sudo rm -rf /usr/local/mysql* sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist sudo rm -rf /Library/StartupItems/MySQLCOM sudo rm -rf /Library/PreferencePanes/My*
Unload previous auto login
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Remove previous config. Delete the line
MYSQLCOM=-YES-
from/etc/hostconfig
Remove previous preferences
sudo rm -rf ~/Library/PreferencePanes/My* sudo rm -rf /Library/Receipts/mysql* sudo rm -rf /Library/Receipts/MySQL* sudo rm -rf /private/var/db/receipts/*mysql* sudo rm -rf /private/var/db/receipts/*mysql* sudo rm -rf /private/var/mysql
Optional, restart computer. I didn't.
2. INSTALL MYSQL
Install Mysql
brew install mysql
Set to run on startup
brew services start mysql
Secure the installation
mysql_secure_installation